ext/ffmpeg/gstffmpegdec.c: Disable parsing for MJPEG input since that's already cut at frame-boundaries. Fixes #163340.

Original commit message from CVS:
Reviewed by:  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_chain):
Disable parsing for MJPEG input since that's already cut at
frame-boundaries. Fixes #163340.
This commit is contained in:
Ronald S. Bultje 2005-01-09 01:30:05 +00:00
parent 4009d4d7bf
commit f536e57b2f
2 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2005-01-09 Luca Ognibene <luogni@tin.it>
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_chain):
Disable parsing for MJPEG input since that's already cut at
frame-boundaries. Fixes #163340.
2005-01-06 Ronald S. Bultje <rbultje@ronald.bitfreak.net> 2005-01-06 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps), * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),

View file

@ -472,7 +472,12 @@ gst_ffmpegdec_chain (GstPad * pad, GstData * _data)
/* parse cache joining */ /* parse cache joining */
if (ffmpegdec->pcache) { if (ffmpegdec->pcache) {
GST_LOG ("Joining %p[%lld/%d]&&%p[%lld/%d]",
ffmpegdec->pcache, GST_BUFFER_OFFSET (ffmpegdec->pcache),
GST_BUFFER_SIZE (ffmpegdec->pcache), inbuf,
GST_BUFFER_OFFSET (inbuf), GST_BUFFER_SIZE (inbuf));
inbuf = gst_buffer_join (ffmpegdec->pcache, inbuf); inbuf = gst_buffer_join (ffmpegdec->pcache, inbuf);
GST_LOG ("done");
ffmpegdec->pcache = NULL; ffmpegdec->pcache = NULL;
bdata = GST_BUFFER_DATA (inbuf); bdata = GST_BUFFER_DATA (inbuf);
bsize = GST_BUFFER_SIZE (inbuf); bsize = GST_BUFFER_SIZE (inbuf);
@ -493,7 +498,8 @@ gst_ffmpegdec_chain (GstPad * pad, GstData * _data)
do { do {
/* parse, if at all possible */ /* parse, if at all possible */
if (ffmpegdec->pctx && ffmpegdec->context->codec_id != CODEC_ID_MP3) { if (ffmpegdec->pctx && ffmpegdec->context->codec_id != CODEC_ID_MP3 &&
ffmpegdec->context->codec_id != CODEC_ID_MJPEG) {
gint res; gint res;
res = av_parser_parse (ffmpegdec->pctx, ffmpegdec->context, res = av_parser_parse (ffmpegdec->pctx, ffmpegdec->context,
@ -613,7 +619,8 @@ gst_ffmpegdec_chain (GstPad * pad, GstData * _data)
gst_buffer_unref (outbuf); gst_buffer_unref (outbuf);
} }
if (!ffmpegdec->pctx || ffmpegdec->context->codec_id == CODEC_ID_MP3) { if (!ffmpegdec->pctx || ffmpegdec->context->codec_id == CODEC_ID_MP3 ||
ffmpegdec->context->codec_id == CODEC_ID_MJPEG) {
bsize -= len; bsize -= len;
bdata += len; bdata += len;
} }