From d0b02c3affad7eba83f0eba91310e2216cf02e2b Mon Sep 17 00:00:00 2001 From: Lynne Date: Wed, 7 Dec 2022 06:42:44 +0100 Subject: [PATCH] hevc_ps: expose vps_id --- libavcodec/hevc_ps.c | 2 +- libavcodec/hevc_ps.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 73f90b4831..581c9293ab 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -464,7 +464,7 @@ int ff_hevc_decode_nal_vps(GetBitContext *gb, AVCodecContext *avctx, } memcpy(vps->data, gb->buffer, vps->data_size); - vps_id = get_bits(gb, 4); + vps_id = vps->vps_id = get_bits(gb, 4); if (get_bits(gb, 2) != 3) { // vps_reserved_three_2bits av_log(avctx, AV_LOG_ERROR, "vps_reserved_three_2bits is not three\n"); diff --git a/libavcodec/hevc_ps.h b/libavcodec/hevc_ps.h index e461b48943..eb9e6beac1 100644 --- a/libavcodec/hevc_ps.h +++ b/libavcodec/hevc_ps.h @@ -145,6 +145,7 @@ typedef struct PTL { } PTL; typedef struct HEVCVPS { + unsigned int vps_id; HEVCHdrParams hdr[HEVC_MAX_LAYER_SETS]; uint8_t vps_temporal_id_nesting_flag;