From 4546bf4116b97d98b6b8380c7bc85a209dfe707c Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Sun, 2 Aug 2009 08:46:11 +0000 Subject: fix jpeg parser when PARSER_FLAG_COMPLETE_FRAMES is set Originally committed as revision 19558 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mjpeg_parser.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libavcodec') diff --git a/libavcodec/mjpeg_parser.c b/libavcodec/mjpeg_parser.c index 2cf2e84588..d14aaaf742 100644 --- a/libavcodec/mjpeg_parser.c +++ b/libavcodec/mjpeg_parser.c @@ -78,6 +78,9 @@ static int jpeg_parse(AVCodecParserContext *s, ParseContext *pc = s->priv_data; int next; + if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){ + next= buf_size; + }else{ next= find_frame_end(pc, buf, buf_size); if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { @@ -85,6 +88,7 @@ static int jpeg_parse(AVCodecParserContext *s, *poutbuf_size = 0; return buf_size; } + } *poutbuf = buf; *poutbuf_size = buf_size; -- cgit v1.2.3