[FFmpeg-cvslog] h264_parser: Fix behaviour when PARSER_FLAG_COMPLETE_FRAMES is set.

Philip Langdale git at videolan.org
Tue Jun 14 05:09:37 CEST 2011


ffmpeg | branch: master | Philip Langdale <philipl at overt.org> | Mon Mar 28 21:42:02 2011 -0700| [a26ce1e2df102ad085cf1a7891722ef64b80ea24] | committer: Anton Khirnov

h264_parser: Fix behaviour when PARSER_FLAG_COMPLETE_FRAMES is set.

Currently, the parser is buggy and only processes the stream extradata
when the flag is set. This fixes it to actually inspect the frames.

Whitespce will be fixed in a separate change.

Signed-off-by: Philip Langdale <philipl at overt.org>
Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavcodec/h264_parser.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 621ff02..a314953 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -270,6 +270,7 @@ static int h264_parse(AVCodecParserContext *s,
             assert(pc->last_index + next >= 0 );
             ff_h264_find_frame_end(h, &pc->buffer[pc->last_index + next], -next); //update state
         }
+    }
 
         parse_nal_units(s, avctx, buf, buf_size);
 
@@ -285,7 +286,6 @@ static int h264_parse(AVCodecParserContext *s,
         if (s->flags & PARSER_FLAG_ONCE) {
             s->flags &= PARSER_FLAG_COMPLETE_FRAMES;
         }
-    }
 
     *poutbuf = buf;
     *poutbuf_size = buf_size;



More information about the ffmpeg-cvslog mailing list