gstffmpegdec: Abort on first failure by AAC decoder. Fixes #566250.

The problem is that the ffmpeg aac decoder fails... but still accepts
the following buffers as if nothing happened. But because some things
were not properly set in the internal code, all hell breaks loose.
This commit is contained in:
Edward Hervey 2009-03-04 21:10:22 +01:00
parent ec1ff94e7b
commit 9eb48ddcda

View file

@ -1858,6 +1858,13 @@ gst_ffmpegdec_audio_frame (GstFFMpegDec * ffmpegdec,
*outbuf = NULL; *outbuf = NULL;
} }
/* If we don't error out after the first failed read with the AAC decoder,
* we must *not* carry on pushing data, else we'll cause segfaults... */
if ((len == -1) && (oclass->in_plugin->id == CODEC_ID_AAC)) {
GST_WARNING_OBJECT (ffmpegdec, "Decoding of AAC stream by FFMPEG failed.");
*ret = GST_FLOW_ERROR;
}
beach: beach:
GST_DEBUG_OBJECT (ffmpegdec, "return flow %d, out %p, len %d", GST_DEBUG_OBJECT (ffmpegdec, "return flow %d, out %p, len %d",
*ret, *outbuf, len); *ret, *outbuf, len);