diff options
author | Edward Hervey <bilboed@bilboed.com> | 2009-03-04 21:10:22 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-03-04 21:10:22 +0100 |
commit | 9eb48ddcdab4982106c595508f96704e0cff5610 (patch) | |
tree | 32a006dd3e0c786332ada4f7f3945bce426a3cad | |
parent | ec1ff94e7bdf1a9964a8d6807251caa53b37fe64 (diff) |
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.
-rw-r--r-- | ext/ffmpeg/gstffmpegdec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index 0bd5879..304604b 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -1858,6 +1858,13 @@ gst_ffmpegdec_audio_frame (GstFFMpegDec * ffmpegdec, *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: GST_DEBUG_OBJECT (ffmpegdec, "return flow %d, out %p, len %d", *ret, *outbuf, len); |