diff options
author | Vivia Nikolaidou <vivia@ahiru.eu> | 2022-11-30 20:47:11 +0200 |
---|---|---|
committer | Vivia Nikolaidou <vivia@ahiru.eu> | 2022-11-30 20:56:30 +0200 |
commit | c9afaf5cd9d07ec915657f27e4dccdfa4732e7d4 (patch) | |
tree | abcdfbeaf2e5e396a735249bbd115b76a26596b9 | |
parent | cdf411e82d7e437e5de138492b6e75e5513686ee (diff) | |
download | gstreamer-c9afaf5cd9d07ec915657f27e4dccdfa4732e7d4.tar.gz |
opusdec: Negotiate default to 2 channels
In that place, dec->n_channels can still theoretically be 0. Default to
2 in that case.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3494>
-rw-r--r-- | subprojects/gst-plugins-base/ext/opus/gstopusdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subprojects/gst-plugins-base/ext/opus/gstopusdec.c b/subprojects/gst-plugins-base/ext/opus/gstopusdec.c index e085f0b9b5..59ed363ff5 100644 --- a/subprojects/gst-plugins-base/ext/opus/gstopusdec.c +++ b/subprojects/gst-plugins-base/ext/opus/gstopusdec.c @@ -310,7 +310,7 @@ gst_opus_dec_negotiate (GstOpusDec * dec, const GstAudioChannelPosition * pos) gst_structure_fixate_field_nearest_int (s, "rate", dec->sample_rate); gst_structure_get_int (s, "rate", &rate); channels = dec->n_channels > 0 ? dec->n_channels : 2; - gst_structure_fixate_field_nearest_int (s, "channels", dec->n_channels); + gst_structure_fixate_field_nearest_int (s, "channels", channels); gst_structure_get_int (s, "channels", &channels); gst_caps_unref (inter); |