mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
opusdec: If channel/rate negotiation fails, fall back to stereo and 48kHz
This commit is contained in:
parent
bd8b25f08b
commit
1ba8f82b94
1 changed files with 11 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue