From 8607ccdf2c7e15d7f0c49e557c18805a304d5f39 Mon Sep 17 00:00:00 2001 From: Carlos Bentzen Date: Fri, 24 Jan 2025 11:46:38 +0100 Subject: [PATCH] h266parse: update IDR position in more cases The IDR position should be updated if we're processing an IDR frame or pushing codec NALs. Not only when picture_header_in_slice_header_flag is set. Part-of: --- .../gst-plugins-bad/gst/videoparsers/gsth266parse.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst/videoparsers/gsth266parse.c b/subprojects/gst-plugins-bad/gst/videoparsers/gsth266parse.c index 46fc76e536..497926ea68 100644 --- a/subprojects/gst-plugins-bad/gst/videoparsers/gsth266parse.c +++ b/subprojects/gst-plugins-bad/gst/videoparsers/gsth266parse.c @@ -854,10 +854,11 @@ gst_h266_parse_process_nal (GstH266Parse * h266parse, GstH266NalUnit * nalu) else if (h266parse->content_light_level_state == GST_H266_PARSE_SEI_ACTIVE) h266parse->content_light_level_state = GST_H266_PARSE_SEI_EXPIRED; - - update_idr_pos (h266parse, nalu); } + if (ph->gdr_or_irap_pic_flag || h266parse->push_codec) + update_idr_pos (h266parse, nalu); + break; } case GST_H266_NAL_SLICE_TRAIL: @@ -916,10 +917,11 @@ gst_h266_parse_process_nal (GstH266Parse * h266parse, GstH266NalUnit * nalu) else if (h266parse->content_light_level_state == GST_H266_PARSE_SEI_ACTIVE) h266parse->content_light_level_state = GST_H266_PARSE_SEI_EXPIRED; - - update_idr_pos (h266parse, nalu); } + if (is_irap_or_gdr || h266parse->push_codec) + update_idr_pos (h266parse, nalu); + break; } case GST_H266_NAL_AUD: