mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
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
This commit is contained in:
parent
7dffa2e1f2
commit
621bf0d22e
1 changed files with 5 additions and 5 deletions
|
@ -192,17 +192,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue