summaryrefslogtreecommitdiff
path: root/libavcodec/h264_parser.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2016-06-12 15:37:58 +0200
committerClément Bœsch <u@pkh.me>2016-06-12 15:43:28 +0200
commit65d5f32fd7d234a9b08e3743593de0a72af7c03c (patch)
treed4e08ec56ec7289cfa01e58a6675808c5b442b31 /libavcodec/h264_parser.c
parentb78b077c91a7f0a5755659dd5a110a41fd0ab90b (diff)
parent113aeee6aed35cb786a9f6d69b0cb210f498b9da (diff)
Merge commit '113aeee6aed35cb786a9f6d69b0cb210f498b9da'
* commit '113aeee6aed35cb786a9f6d69b0cb210f498b9da': h264_parser: move the H264DSPContext to the parser context H264Context is kept locally as it is currently needed for logging (h->avctx as log context) and for is_avc and nal_length_size. These later fields will later be obtained when the extradata parsing is decoupled from the decoder. This code will be updated accordingly when that commit is merged. Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r--libavcodec/h264_parser.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 0913452833..51ca9f2bd1 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -48,6 +48,7 @@ typedef struct H264ParseContext {
H264Context h;
ParseContext pc;
H264ParamSets ps;
+ H264DSPContext h264dsp;
int got_first;
} H264ParseContext;
@@ -84,7 +85,7 @@ static int h264_find_frame_end(H264ParseContext *p, const uint8_t *buf,
}
if (state == 7) {
- i += h->h264dsp.startcode_find_candidate(buf + i, next_avc - i);
+ i += p->h264dsp.startcode_find_candidate(buf + i, next_avc - i);
if (i < next_avc)
state = 2;
} else if (state <= 2) {
@@ -684,7 +685,7 @@ static av_cold int init(AVCodecParserContext *s)
h->nb_slice_ctx = 1;
h->slice_context_count = 1;
- ff_h264dsp_init(&h->h264dsp, 8, 1);
+ ff_h264dsp_init(&p->h264dsp, 8, 1);
return 0;
}