summaryrefslogtreecommitdiff
path: root/libavcodec/h264_parser.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2011-03-28 21:42:02 -0700
committerPhilip Langdale <philipl@overt.org>2011-04-04 20:32:33 -0700
commit01f5b9c51eba113b3e8b594ef55e8f08071cdeb6 (patch)
treeec3025cc4bc128279388ab74b0f9e90ee1e4c144 /libavcodec/h264_parser.c
parenteb79c528d8285421a009f01e279ad4cda0fa91b5 (diff)
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@overt.org>
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r--libavcodec/h264_parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index c5728e2678..3b5627dbca 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);
@@ -282,10 +283,10 @@ static int h264_parse(AVCodecParserContext *s,
s->dts_ref_dts_delta = INT_MIN;
s->pts_dts_delta = INT_MIN;
}
+
if (s->flags & PARSER_FLAG_ONCE) {
s->flags &= PARSER_FLAG_COMPLETE_FRAMES;
}
- }
*poutbuf = buf;
*poutbuf_size = buf_size;