From 98c97994c5b90bdae02accb155eeceeb5224b8ef Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 29 Mar 2016 04:09:14 +0200 Subject: h264: decouple extradata parsing from the decoder This will allow decoupling the parser from the decoder. --- libavcodec/h264_parser.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libavcodec/h264_parser.c') diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 7c674b8f91..9a6464cd5f 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -50,6 +50,8 @@ typedef struct H264ParseContext { H264DSPContext h264dsp; H264POCContext poc; H264SEIContext sei; + int is_avc; + int nal_length_size; int got_first; } H264ParseContext; @@ -500,7 +502,9 @@ static int h264_parse(AVCodecParserContext *s, // NB: estimate_timings_from_pts behaves exactly like this. if (!avctx->has_b_frames) h->low_delay = 1; - ff_h264_decode_extradata(h); + ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size, + &p->ps, &p->is_avc, &p->nal_length_size, + avctx->err_recognition, avctx); } } -- cgit v1.2.3