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>
This commit is contained in:
Clément Bœsch 2016-06-12 15:37:58 +02:00
commit 65d5f32fd7

View File

@ -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;
}