From 6a6f8c967cb3c88578f6364a0ec39fbedd147a72 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Thu, 12 Nov 2020 19:43:22 +0900 Subject: [PATCH] codecs: h264decoder: Don't fill gap picture if it's not allowed We should fill gap picture only if sps->gaps_in_frame_num_value_allowed_flag is set. Part-of: --- gst-libs/gst/codecs/gsth264decoder.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/codecs/gsth264decoder.c b/gst-libs/gst/codecs/gsth264decoder.c index 6cbdcb2a54..d4ad5cbb2d 100644 --- a/gst-libs/gst/codecs/gsth264decoder.c +++ b/gst-libs/gst/codecs/gsth264decoder.c @@ -632,7 +632,10 @@ gst_h264_decoder_handle_frame_num_gap (GstH264Decoder * self, gint frame_num) if (!sps->gaps_in_frame_num_value_allowed_flag) { /* This is likely the case where some frames were dropped. * then we need to keep decoding without error out */ - GST_WARNING_OBJECT (self, "Invalid frame num %d", frame_num); + GST_WARNING_OBJECT (self, "Invalid frame num %d, maybe frame drop", + frame_num); + + return TRUE; } GST_DEBUG_OBJECT (self, "Handling frame num gap %d -> %d (MaxFrameNum: %d)",