[FFmpeg-cvslog] Support PARSER_FLAG_COMPLETE_FRAMES for h261 and h263 parsers.

Reimar Döffinger git at videolan.org
Mon Apr 25 00:20:12 CEST 2011


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Sun Apr 24 19:17:17 2011 +0200| [02e3f7d042aabd98d4114f7f84b4b480a93daaa1] | committer: Reimar Döffinger

Support PARSER_FLAG_COMPLETE_FRAMES for h261 and h263 parsers.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=02e3f7d042aabd98d4114f7f84b4b480a93daaa1
---

 libavcodec/h261_parser.c |    4 ++++
 libavcodec/h263_parser.c |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/libavcodec/h261_parser.c b/libavcodec/h261_parser.c
index defc1cb..4d20afe 100644
--- a/libavcodec/h261_parser.c
+++ b/libavcodec/h261_parser.c
@@ -70,12 +70,16 @@ static int h261_parse(AVCodecParserContext *s,
     ParseContext *pc = s->priv_data;
     int next;
 
+    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;
diff --git a/libavcodec/h263_parser.c b/libavcodec/h263_parser.c
index e081983..2a00291 100644
--- a/libavcodec/h263_parser.c
+++ b/libavcodec/h263_parser.c
@@ -70,6 +70,9 @@ static int h263_parse(AVCodecParserContext *s,
     ParseContext *pc = s->priv_data;
     int next;
 
+    if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) {
+        next = buf_size;
+    } else {
     next= ff_h263_find_frame_end(pc, buf, buf_size);
 
     if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
@@ -77,6 +80,7 @@ static int h263_parse(AVCodecParserContext *s,
         *poutbuf_size = 0;
         return buf_size;
     }
+    }
 
     *poutbuf = buf;
     *poutbuf_size = buf_size;



More information about the ffmpeg-cvslog mailing list