diff --git a/libavcodec/hevc_mp4toannexb_bsf.c b/libavcodec/hevc_mp4toannexb_bsf.c index f9a025a36b..d91229a895 100644 --- a/libavcodec/hevc_mp4toannexb_bsf.c +++ b/libavcodec/hevc_mp4toannexb_bsf.c @@ -157,7 +157,8 @@ static int hevc_mp4toannexb_filter(AVBSFContext *ctx, AVPacket *out) nalu_type = (bytestream2_peek_byte(&gb) >> 1) & 0x3f; /* prepend extradata to IRAP frames */ - is_irap = nalu_type >= 16 && nalu_type <= 23; + is_irap = nalu_type >= HEVC_NAL_BLA_W_LP && + nalu_type <= HEVC_NAL_RSV_IRAP_VCL23; add_extradata = is_irap && !got_irap; extra_size = add_extradata * ctx->par_out->extradata_size; got_irap |= is_irap;