Re: [PATCH 1/1] Add sbc cap null case while GST AVDTP Signaling.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chan-yeol,

> Due to RF condition or headset malfunctioning, gst audio plug-in
> could not get sbc(mandatory codec) information.
> ---
>  audio/gstavdtpsink.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/audio/gstavdtpsink.c b/audio/gstavdtpsink.c
> index b448d57..1d50914 100644
> --- a/audio/gstavdtpsink.c
> +++ b/audio/gstavdtpsink.c
> @@ -1121,6 +1121,11 @@ static gboolean gst_avdtp_sink_update_caps(GstAvdtpSink *self)
>  	sbc = (void *) gst_avdtp_find_caps(self, BT_A2DP_SBC_SINK);
>  	mpeg = (void *) gst_avdtp_find_caps(self, BT_A2DP_MPEG12_SINK);
>  
> +	if(!sbc) {

space before brackets are not not option. Please follow the coding style
and fix this.

> +		GST_ERROR_OBJECT(self, "Failed to find sbc(mandatory codec)");

And please use proper error messages aka "Failed to find mandatory SBC
sink".

> +		return FALSE;
> +	}
> +
>  	sbc_structure = gst_avdtp_sink_parse_sbc_caps(self, sbc);
>  	mpeg_structure = gst_avdtp_sink_parse_mpeg_caps(self, mpeg);
>  

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux