diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2013-12-06 00:22:20 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2013-12-12 23:47:34 +0000 |
commit | 17a1bdd230805ace4e4934beb7932e6d824c3fb5 (patch) | |
tree | a413a77f375174364d5056bbf7d7b7e757c995e5 | |
parent | 1055a58ddbbb04ac670bd26f68852b8e61b7c968 (diff) | |
download | gstreamer-plugins-bad-17a1bdd230805ace4e4934beb7932e6d824c3fb5.tar.gz |
gsmdec: fix decoding of audio/ms-gsm variant
Alternates between 33 and 32 byte frames, but must start
with a 33 byte frame. This has been broken for ages since
the element was ported to the audio decoder base class.
https://bugzilla.gnome.org/show_bug.cgi?id=709416
-rw-r--r-- | ext/gsm/gstgsmdec.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/gsm/gstgsmdec.c b/ext/gsm/gstgsmdec.c index fc182cd28..d8d140fd9 100644 --- a/ext/gsm/gstgsmdec.c +++ b/ext/gsm/gstgsmdec.c @@ -191,17 +191,17 @@ gst_gsmdec_parse (GstAudioDecoder * dec, GstAdapter * adapter, size = gst_adapter_available (adapter); g_return_val_if_fail (size > 0, GST_FLOW_ERROR); - /* WAV49 requires alternating 33 and 32 bytes of input */ - if (gsmdec->use_wav49) { - gsmdec->needed = (gsmdec->needed == 33 ? 32 : 33); - } - if (size < gsmdec->needed) return GST_FLOW_EOS; *offset = 0; *length = gsmdec->needed; + /* WAV49 requires alternating 33 and 32 bytes of input */ + if (gsmdec->use_wav49) { + gsmdec->needed = (gsmdec->needed == 33 ? 32 : 33); + } + return GST_FLOW_OK; } |