summaryrefslogtreecommitdiff
path: root/libavcodec/h264_parser.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-03-29 04:09:14 +0200
committerAnton Khirnov <anton@khirnov.net>2016-04-24 10:06:24 +0200
commit98c97994c5b90bdae02accb155eeceeb5224b8ef (patch)
tree6b1d8f2e9e22048be95d2dc6d1072b8d533e95d2 /libavcodec/h264_parser.c
parent728d90a0c1973661a9e73da697bf4f90c9d19577 (diff)
h264: decouple extradata parsing from the decoder
This will allow decoupling the parser from the decoder.
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r--libavcodec/h264_parser.c6
1 files changed, 5 insertions, 1 deletions
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);
}
}