mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
opusdec: remove check for number of channels
opus decoder can convert from different number of channels, no need to check, just let it negotiate and create a new decoder if needed. https://bugzilla.gnome.org/show_bug.cgi?id=755059
This commit is contained in:
parent
0ed501ab03
commit
7e834a5d85
1 changed files with 0 additions and 6 deletions
|
@ -297,12 +297,6 @@ gst_opus_dec_parse_header (GstOpusDec * dec, GstBuffer * buf)
|
||||||
gst_buffer_map (buf, &map, GST_MAP_READ);
|
gst_buffer_map (buf, &map, GST_MAP_READ);
|
||||||
data = map.data;
|
data = map.data;
|
||||||
|
|
||||||
if (!(dec->n_channels == 0 || dec->n_channels == data[9])) {
|
|
||||||
gst_buffer_unmap (buf, &map);
|
|
||||||
GST_ERROR_OBJECT (dec, "Opus ID header has invalid channels");
|
|
||||||
return GST_FLOW_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
dec->n_channels = data[9];
|
dec->n_channels = data[9];
|
||||||
dec->sample_rate = GST_READ_UINT32_LE (data + 12);
|
dec->sample_rate = GST_READ_UINT32_LE (data + 12);
|
||||||
dec->pre_skip = GST_READ_UINT16_LE (data + 10);
|
dec->pre_skip = GST_READ_UINT16_LE (data + 10);
|
||||||
|
|
Loading…
Reference in a new issue