diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-11-01 23:34:32 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-11-03 09:36:46 +0200 |
commit | 5338d87d4e20b9f7fcd4f53b224c134b1e56ab0e (patch) | |
tree | ccaa9cd9dd4b6ae9c49c5f02b83ad33294de4414 /ext/opus | |
parent | 42fbf04611e64b80b3a7ee0185490b303f6f425d (diff) | |
download | gstreamer-plugins-bad-5338d87d4e20b9f7fcd4f53b224c134b1e56ab0e.tar.gz |
opusdec: Assume 48kHz if no sample rate is given in the header
Diffstat (limited to 'ext/opus')
-rw-r--r-- | ext/opus/gstopusdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/opus/gstopusdec.c b/ext/opus/gstopusdec.c index 7b7a10bb5..b081b99b2 100644 --- a/ext/opus/gstopusdec.c +++ b/ext/opus/gstopusdec.c @@ -299,6 +299,8 @@ gst_opus_dec_parse_header (GstOpusDec * dec, GstBuffer * buf) dec->n_channels = data[9]; 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->r128_gain = GST_READ_UINT16_LE (data + 16); dec->r128_gain_volume = gst_opus_dec_get_r128_volume (dec->r128_gain); |