aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-08-02 08:46:11 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-08-02 08:46:11 +0000
commit4546bf4116b97d98b6b8380c7bc85a209dfe707c (patch)
tree3dc8f5cdd7311a387bd7f27374407e5943bb7441
parent062394e07caf07e39436ca66fd6f4ba50a05839c (diff)
downloadffmpeg-4546bf4116b97d98b6b8380c7bc85a209dfe707c.tar.gz
fix jpeg parser when PARSER_FLAG_COMPLETE_FRAMES is set
Originally committed as revision 19558 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mjpeg_parser.c4
1 files changed, 4 insertions, 0 deletions
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;