]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h261_parser.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavcodec / h261_parser.c
index c32300d6ed84a8c5c2046913d1ed2d1b49e912be..3fb86db1255c30ec95b283fbae9391f8da351465 100644 (file)
@@ -70,18 +70,22 @@ static int h261_parse(AVCodecParserContext *s,
     ParseContext *pc = s->priv_data;
     int next;
 
-    next= h261_find_frame_end(pc,avctx, buf, buf_size);
-    if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
-        *poutbuf = NULL;
-        *poutbuf_size = 0;
-        return buf_size;
+    if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) {
+        next = buf_size;
+    } else {
+        next= h261_find_frame_end(pc,avctx, buf, buf_size);
+        if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
+            *poutbuf = NULL;
+            *poutbuf_size = 0;
+            return buf_size;
+        }
     }
     *poutbuf = buf;
     *poutbuf_size = buf_size;
     return next;
 }
 
-AVCodecParser h261_parser = {
+AVCodecParser ff_h261_parser = {
     { CODEC_ID_H261 },
     sizeof(ParseContext),
     NULL,