avcodec/evc_parse: pass a GetBitContext to the slice header parsing function

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2023-06-20 11:05:38 -03:00
parent 2212808a72
commit e5da2ec456
4 changed files with 35 additions and 33 deletions

View File

@@ -116,7 +116,11 @@ static int parse_nal_unit(AVCodecParserContext *s, AVCodecContext *avctx,
EVCParserSliceHeader sh;
int bit_depth;
ret = ff_evc_parse_slice_header(&sh, &ctx->ps, nalu_type, buf, buf_size);
ret = init_get_bits8(&gb, buf, buf_size);
if (ret < 0)
return ret;
ret = ff_evc_parse_slice_header(&gb, &sh, &ctx->ps, nalu_type);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "Slice header parsing error\n");
return ret;