changeset 10000:334d727f7f7a libavcodec

fix jpeg parser when PARSER_FLAG_COMPLETE_FRAMES is set
author bcoudurier
date Sun, 02 Aug 2009 08:46:11 +0000
parents c78fd9154378
children 944156621f05
files mjpeg_parser.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mjpeg_parser.c	Thu Jul 30 21:00:08 2009 +0000
+++ b/mjpeg_parser.c	Sun Aug 02 08:46:11 2009 +0000
@@ -78,6 +78,9 @@
     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 @@
         *poutbuf_size = 0;
         return buf_size;
     }
+    }
 
     *poutbuf = buf;
     *poutbuf_size = buf_size;