Commit d37c5e90 authored by Wim Taymans's avatar Wim Taymans
Browse files

L16depay: default to 1 channel

When we can't find any channel or encoding-params on the caps for dynamic
payload types, set the default number of channels to 1, as the spec says we
should.

See #623209
parent 9dcfed0a
...@@ -156,7 +156,7 @@ gst_rtp_L16_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) ...@@ -156,7 +156,7 @@ gst_rtp_L16_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
clock_rate = 44100; clock_rate = 44100;
break; break;
default: default:
/* no fixed mapping, we need channels and clock-rate */ /* no fixed mapping, we need clock-rate */
channels = 0; channels = 0;
clock_rate = 0; clock_rate = 0;
break; break;
...@@ -173,7 +173,8 @@ gst_rtp_L16_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) ...@@ -173,7 +173,8 @@ gst_rtp_L16_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
if (channels == 0) { if (channels == 0) {
channels = gst_rtp_L16_depay_parse_int (structure, "channels", channels); channels = gst_rtp_L16_depay_parse_int (structure, "channels", channels);
if (channels == 0) { if (channels == 0) {
goto no_channels; /* channels defaults to 1 otherwise */
channels = 1;
} }
} }
...@@ -218,11 +219,6 @@ no_clockrate: ...@@ -218,11 +219,6 @@ no_clockrate:
GST_ERROR_OBJECT (depayload, "no clock-rate specified"); GST_ERROR_OBJECT (depayload, "no clock-rate specified");
return FALSE; return FALSE;
} }
no_channels:
{
GST_ERROR_OBJECT (depayload, "no channels specified");
return FALSE;
}
} }
static GstBuffer * static GstBuffer *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment