[FFmpeg-devel] [PATCH 3/5] h264dec: add idr_pic_id to slice context

Jonas Karlman jonas at kwiboo.se
Wed Dec 9 22:25:17 EET 2020


From: Ezequiel Garcia <ezequiel at collabora.com>

Signed-off-by: Ezequiel Garcia <ezequiel at collabora.com>
Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
---
 libavcodec/h264_slice.c | 2 +-
 libavcodec/h264dec.h    | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index fa7a639053..8a3ce1a688 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1824,7 +1824,7 @@ static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,
     }
 
     if (nal->type == H264_NAL_IDR_SLICE)
-        get_ue_golomb_long(&sl->gb); /* idr_pic_id */
+        sl->idr_pic_id = get_ue_golomb_long(&sl->gb);
 
     if (sps->poc_type == 0) {
         sl->poc_lsb = get_bits(&sl->gb, sps->log2_max_poc_lsb);
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index 29c4d4e42c..2ca9965b41 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -335,6 +335,7 @@ typedef struct H264SliceContext {
     int delta_poc[2];
     int curr_pic_num;
     int max_pic_num;
+    int idr_pic_id;
 } H264SliceContext;
 
 /**
-- 
2.17.1



More information about the ffmpeg-devel mailing list