diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2008-07-01 09:39:19 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2008-07-01 09:39:19 +0000 |
commit | 17e954b034eae157d1d49a3ede1ce9cd5fe14aff (patch) | |
tree | 8f3c2dbb77cceec4039057c3783bfb84ba8344a6 | |
parent | bed7aa3f98d5a893f494515452449eaea8144acc (diff) |
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.
-rw-r--r-- | ChangeLog | 10 | ||||
m--------- | common | 0 | ||||
-rw-r--r-- | ext/ffmpeg/gstffmpegdec.c | 12 |
3 files changed, 12 insertions, 10 deletions
@@ -1,3 +1,13 @@ +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: diff --git a/common b/common -Subproject 46ec7dfc1c09ff550ed6b7a4e0d3f2b2ac7d3ee +Subproject d9cd98b46aebaf143dc43d8563a3bff650be6a7 diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index f624a9c..9b76e4e 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -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; |