From 8055b0386f8332219d0c2e60b5c6f53e2608f5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 1 Oct 2024 16:40:13 -0400 Subject: [PATCH] h264parse: Don't fake IDR without at least an i-slice There was an override to fake an IDR as soon as a SPS/PPS is encountered, but that's not valid, at least an i-slice is needed. Amend the visl result, as the output is slightly more correct, not duplicating frame_num. Part-of: --- ci/fluster/visl_references/test_suites/h264/JVT-AVC_V1.json | 2 +- subprojects/gst-plugins-bad/gst/videoparsers/gsth264parse.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ci/fluster/visl_references/test_suites/h264/JVT-AVC_V1.json b/ci/fluster/visl_references/test_suites/h264/JVT-AVC_V1.json index a648a30778..02b435063f 100644 --- a/ci/fluster/visl_references/test_suites/h264/JVT-AVC_V1.json +++ b/ci/fluster/visl_references/test_suites/h264/JVT-AVC_V1.json @@ -761,7 +761,7 @@ "source_checksum": "3644489dab877ffbf5497594098f63e2", "input_file": "FM1_FT_E.264", "output_format": "yuv420p", - "result": "46b584c89e359c39619bc144f9f29162" + "result": "de3efddc727557b89ad9b09edcfb7365" }, { "name": "FM2_SVA_C", diff --git a/subprojects/gst-plugins-bad/gst/videoparsers/gsth264parse.c b/subprojects/gst-plugins-bad/gst/videoparsers/gsth264parse.c index 675a2440e8..35cde95df8 100644 --- a/subprojects/gst-plugins-bad/gst/videoparsers/gsth264parse.c +++ b/subprojects/gst-plugins-bad/gst/videoparsers/gsth264parse.c @@ -1116,8 +1116,7 @@ gst_h264_parse_process_nal (GstH264Parse * h264parse, GstH264NalUnit * nalu) h264parse->field_pic_flag = slice.field_pic_flag; } - if (G_LIKELY (nal_type != GST_H264_NAL_SLICE_IDR && - !h264parse->push_codec)) + if (G_LIKELY (nal_type != GST_H264_NAL_SLICE_IDR)) break; /* if we need to sneak codec NALs into the stream,