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:
bd8b25f
)
opusdec: If channel/rate negotiation fails, fall back to stereo and 48kHz
author
Sebastian Dröge
<sebastian@centricular.com>
Thu, 4 Jun 2015 09:54:24 +0000
(11:54 +0200)
committer
Sebastian Dröge
<sebastian@centricular.com>
Thu, 4 Jun 2015 09:54:24 +0000
(11:54 +0200)
ext/opus/gstopusdec.c
patch
|
blob
|
history
diff --git
a/ext/opus/gstopusdec.c
b/ext/opus/gstopusdec.c
index bd9847b0eae5018f0f28f32e257dc6f7210d5380..c88b9eeddfbeeb25235c4eb95c423e5ef2d97514 100644
(file)
--- a/
ext/opus/gstopusdec.c
+++ b/
ext/opus/gstopusdec.c
@@
-240,6
+240,17
@@
gst_opus_dec_negotiate (GstOpusDec * dec, const GstAudioChannelPosition * pos)
gst_caps_unref (caps);
}
+ if (dec->n_channels == 0) {
+ GST_DEBUG_OBJECT (dec, "Using a default of 2 channels");
+ dec->n_channels = 2;
+ pos = NULL;
+ }
+
+ if (dec->sample_rate == 0) {
+ GST_DEBUG_OBJECT (dec, "Using a default of 48kHz sample rate");
+ dec->sample_rate = 48000;
+ }
+
GST_INFO_OBJECT (dec, "Negotiated %d channels, %d Hz", dec->n_channels,
dec->sample_rate);