You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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:
@@ -48,6 +48,7 @@ typedef struct H264ParseContext {
|
|||||||
H264Context h;
|
H264Context h;
|
||||||
ParseContext pc;
|
ParseContext pc;
|
||||||
H264ParamSets ps;
|
H264ParamSets ps;
|
||||||
|
H264DSPContext h264dsp;
|
||||||
int got_first;
|
int got_first;
|
||||||
} H264ParseContext;
|
} H264ParseContext;
|
||||||
|
|
||||||
@@ -84,7 +85,7 @@ static int h264_find_frame_end(H264ParseContext *p, const uint8_t *buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (state == 7) {
|
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)
|
if (i < next_avc)
|
||||||
state = 2;
|
state = 2;
|
||||||
} else if (state <= 2) {
|
} else if (state <= 2) {
|
||||||
@@ -684,7 +685,7 @@ static av_cold int init(AVCodecParserContext *s)
|
|||||||
h->nb_slice_ctx = 1;
|
h->nb_slice_ctx = 1;
|
||||||
|
|
||||||
h->slice_context_count = 1;
|
h->slice_context_count = 1;
|
||||||
ff_h264dsp_init(&h->h264dsp, 8, 1);
|
ff_h264dsp_init(&p->h264dsp, 8, 1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user