projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18c8abe
)
opusdec: Assume 48kHz if no sample rate is given in the header
author
Sebastian Dröge
<sebastian@centricular.com>
Sun, 1 Nov 2015 21:34:32 +0000
(23:34 +0200)
committer
Sebastian Dröge
<sebastian@centricular.com>
Mon, 2 Nov 2015 07:36:46 +0000
(09:36 +0200)
ext/opus/gstopusdec.c
patch
|
blob
|
history
diff --git
a/ext/opus/gstopusdec.c
b/ext/opus/gstopusdec.c
index 7b7a10bb5696690e8e62fab8277602c40c46c954..b081b99b2ef33b79b13f1dd6ee0ebd5404abf219 100644
(file)
--- 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);