summaryrefslogtreecommitdiff
path: root/libavcodec/h264_parser.c
diff options
context:
space:
mode:
authorHoward Chu <hyc@highlandsun.com>2010-05-28 18:50:39 +0000
committerHoward Chu <hyc@highlandsun.com>2010-05-28 18:50:39 +0000
commit23584bec87f2cab947e28ba54b0499492d6e5891 (patch)
tree50a6e72c17e20a8bc9e291e7057d70dd4e2c5266 /libavcodec/h264_parser.c
parent22a255842b0c9c269fa50cc578830795c78579e6 (diff)
downloadffmpeg-23584bec87f2cab947e28ba54b0499492d6e5891.tar.gz
Parse avctx->extradata if available.
Fixes many "non-existing PPS referenced" error messages Originally committed as revision 23363 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r--libavcodec/h264_parser.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 88529505af..06271cf41c 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -245,6 +245,14 @@ static int h264_parse(AVCodecParserContext *s,
ParseContext *pc = &h->s.parse_context;
int next;
+ if (h->first_picture) {
+ h->first_picture = 0;
+ if (avctx->extradata_size) {
+ h->s.avctx = avctx;
+ ff_h264_decode_extradata(h);
+ }
+ }
+
if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){
next= buf_size;
}else{
@@ -319,6 +327,7 @@ static int init(AVCodecParserContext *s)
{
H264Context *h = s->priv_data;
h->thread_context[0] = h;
+ h->first_picture = 1;
return 0;
}