mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
opusdec: Assume 48kHz if no sample rate is given in the header
This commit is contained in:
parent
7cadfcb0b0
commit
9c195e37da
1 changed files with 2 additions and 0 deletions
|
@ -299,6 +299,8 @@ gst_opus_dec_parse_header (GstOpusDec * dec, GstBuffer * buf)
|
||||||
|
|
||||||
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);
|
||||||
|
if (dec->sample_rate == 0)
|
||||||
|
dec->sample_rate = 48000;
|
||||||
dec->pre_skip = GST_READ_UINT16_LE (data + 10);
|
dec->pre_skip = GST_READ_UINT16_LE (data + 10);
|
||||||
dec->r128_gain = GST_READ_UINT16_LE (data + 16);
|
dec->r128_gain = GST_READ_UINT16_LE (data + 16);
|
||||||
dec->r128_gain_volume = gst_opus_dec_get_r128_volume (dec->r128_gain);
|
dec->r128_gain_volume = gst_opus_dec_get_r128_volume (dec->r128_gain);
|
||||||
|
|
Loading…
Reference in a new issue