From 00cdd0986f133e4e2e65abfd0c9fe52ad5d5029f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= Date: Wed, 25 Oct 2023 14:24:58 +0200 Subject: [PATCH] packetizer: h264: store IDR noprevoutput flag --- modules/packetizer/h264_slice.c | 7 ++++++- modules/packetizer/h264_slice.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/packetizer/h264_slice.c b/modules/packetizer/h264_slice.c index 5319957006..d22e008311 100644 --- a/modules/packetizer/h264_slice.c +++ b/modules/packetizer/h264_slice.c @@ -185,7 +185,12 @@ bool h264_decode_slice( const uint8_t *p_buffer, size_t i_buffer, } /* dec_ref_pic_marking() */ - if( p_slice->i_nal_type != 5 ) /* IdrFlag */ + if( p_slice->i_nal_type == 5 ) /* IdrFlag */ + { + p_slice->no_output_of_prior_pics_flag = bs_read1( &s ); + bs_skip( &s, 1 ); /* long_term_reference_flag */ + } + else { if( bs_read1( &s ) ) /* adaptive_ref_pic_marking_mode_flag */ { diff --git a/modules/packetizer/h264_slice.h b/modules/packetizer/h264_slice.h index 029c94f65c..28adb14e7d 100644 --- a/modules/packetizer/h264_slice.h +++ b/modules/packetizer/h264_slice.h @@ -51,6 +51,7 @@ typedef struct int i_delta_pic_order_cnt0; int i_delta_pic_order_cnt1; + bool no_output_of_prior_pics_flag; bool has_mmco5; } h264_slice_t;