ffmpegdec: post an error message on the bus when decoding fails

We should post a STREAM DECODE error message on the bus when we return
GST_FLOW_ERROR, otherwise the user ends up seeing an ugly internal flow
error message, which isn't very nice.
This commit is contained in:
Tim-Philipp Müller 2009-03-06 11:01:55 +00:00
parent eeffd7b87f
commit c389f49295

View file

@ -1861,7 +1861,8 @@ gst_ffmpegdec_audio_frame (GstFFMpegDec * ffmpegdec,
/* 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 && in_plugin->id == CODEC_ID_AAC) {
GST_WARNING_OBJECT (ffmpegdec, "Decoding of AAC stream by FFMPEG failed.");
GST_ELEMENT_ERROR (ffmpegdec, STREAM, DECODE, (NULL),
("Decoding of AAC stream by FFMPEG failed."));
*ret = GST_FLOW_ERROR;
}