Commit 17e954b0 authored by Jan Schmidt's avatar Jan Schmidt

ext/ffmpeg/gstffmpegdec.c: If ffmpeg reports 0 bytes of input data consumed,...

ext/ffmpeg/gstffmpegdec.c: If ffmpeg reports 0 bytes of input data consumed, don't break out unless it also didn't pr...

Original commit message from CVS:
* ext/ffmpeg/gstffmpegdec.c:
If ffmpeg reports 0 bytes of input data consumed, don't break out
unless it also didn't produce any output. Fixes the audio in #377400
and doesn't break anything else I've tested.
Enable the mp3 parser, and set mp3 and mpeg2-video decoding autoplug
at marginal level, as they seem to both work fine now.
parent bed7aa3f
2008-07-01 Jan Schmidt <jan.schmidt@sun.com>
* ext/ffmpeg/gstffmpegdec.c:
If ffmpeg reports 0 bytes of input data consumed, don't break out
unless it also didn't produce any output. Fixes the audio in #377400
and doesn't break anything else I've tested.
Enable the mp3 parser, and set mp3 and mpeg2-video decoding autoplug
at marginal level, as they seem to both work fine now.
2008-06-13 Edward Hervey <edward.hervey@collabora.co.uk>
* ext/ffmpeg/gstffmpegcodecmap.c:
......
common @ d9cd98b4
Subproject commit 46ec7dfc1c09ff550ed6b7a4e0d3f2b2ac7d3ee8
Subproject commit d9cd98b46aebaf143dc43d8563a3bff650be6a7e
......@@ -529,7 +529,6 @@ gst_ffmpegdec_open (GstFFMpegDec * ffmpegdec)
switch (oclass->in_plugin->id) {
case CODEC_ID_MPEG4:
case CODEC_ID_MJPEG:
case CODEC_ID_MP3:
case CODEC_ID_VC1:
GST_LOG_OBJECT (ffmpegdec, "not using parser, blacklisted codec");
ffmpegdec->pctx = NULL;
......@@ -2245,7 +2244,7 @@ gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf)
break;
}
if (!ffmpegdec->pctx) {
if (len == 0) {
if (len == 0 && !have_data) {
/* nothing was decoded, this could be because no data was available or
* because we were skipping frames.
* If we have no context we must exit and wait for more data, we keep the
......@@ -2285,7 +2284,7 @@ gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf)
} while (bsize > 0);
/* keep left-over */
if ((ffmpegdec->pctx || oclass->in_plugin->id == CODEC_ID_MP3) && bsize > 0) {
if (ffmpegdec->pctx && bsize > 0) {
in_timestamp = GST_BUFFER_TIMESTAMP (inbuf);
GST_LOG_OBJECT (ffmpegdec,
......@@ -2518,13 +2517,6 @@ gst_ffmpegdec_register (GstPlugin * plugin)
note: if you change this, see the code in gstdv.c in good/ext/dv. */
rank = GST_RANK_SECONDARY;
break;
/* MP3 and MPEG2 have better alternatives and
the ffmpeg versions don't work properly feel
free to assign rank if you fix them */
case CODEC_ID_MP3:
case CODEC_ID_MPEG2VIDEO:
rank = GST_RANK_NONE;
break;
default:
rank = GST_RANK_MARGINAL;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment