From a9ae85816dfaa8791f974348825fc8ba9209423d Mon Sep 17 00:00:00 2001 From: Lynne Date: Thu, 10 Mar 2022 18:08:53 +0100 Subject: [PATCH 05/72] h264_parser: expose idr_pic_id Vulkan needs it. --- libavcodec/h264_parse.h | 1 + libavcodec/h264_parser.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264_parse.h b/libavcodec/h264_parse.h index 4ee863df66..4ba0add4f2 100644 --- a/libavcodec/h264_parse.h +++ b/libavcodec/h264_parse.h @@ -85,6 +85,7 @@ typedef struct H264POCContext { int delta_poc_bottom; int delta_poc[2]; int frame_num; + int idr_pic_id; int prev_poc_msb; ///< poc_msb of the last reference pic for POC type 0 int prev_poc_lsb; ///< poc_lsb of the last reference pic for POC type 0 int frame_num_offset; ///< for POC type 2 diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 46134a1c48..1c330484c1 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -432,7 +432,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, } if (nal.type == H264_NAL_IDR_SLICE) - get_ue_golomb_long(&nal.gb); /* idr_pic_id */ + p->poc.idr_pic_id = get_ue_golomb_long(&nal.gb); /* idr_pic_id */ if (sps->poc_type == 0) { p->poc.poc_lsb = get_bits(&nal.gb, sps->log2_max_poc_lsb); -- 2.39.2