aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc_mp4toannexb_bsf.c
diff options
context:
space:
mode:
authorZhao Zhili <zhilizhao@tencent.com>2023-12-27 20:49:23 +0800
committerZhao Zhili <zhilizhao@tencent.com>2024-01-05 01:14:33 +0800
commitb7ac1f9856afc7bb907d58280fea4fc033502cc6 (patch)
treef745582d18525782edd4011230565d83d2b50b0e /libavcodec/hevc_mp4toannexb_bsf.c
parent99debe5f823f45a482e1dc08de35879aa9c74bd2 (diff)
downloadffmpeg-b7ac1f9856afc7bb907d58280fea4fc033502cc6.tar.gz
avcodec/hevc_mp4toannexb_bsf: use HEVCNALUnitType instead of integer literal
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Diffstat (limited to 'libavcodec/hevc_mp4toannexb_bsf.c')
-rw-r--r--libavcodec/hevc_mp4toannexb_bsf.c3
1 files changed, 2 insertions, 1 deletions
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;