h264parse: try harder to update timecode
authorMathieu Duponchelle <mathieu@centricular.com>
Thu, 12 Nov 2020 21:27:08 +0000 (22:27 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 13 Nov 2020 13:09:01 +0000 (13:09 +0000)
NumClockTS is the maximum number of timecodes the pic_timing SEI
can carry, but it is perfectly OK for it to carry fewer, and have
one of the clock_timestamp_flags set to 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1804>

gst/videoparsers/gsth264parse.c

index 9dc235c..d5f2816 100644 (file)
@@ -2841,16 +2841,16 @@ gst_h264_parse_create_pic_timing_sei (GstH264Parse * h264parse,
 
   num_clock_ts = num_clock_ts_table[h264parse->sei_pic_struct];
 
-  if (num_meta != num_clock_ts) {
+  if (num_meta > num_clock_ts) {
     GST_LOG_OBJECT (h264parse,
-        "The number of timecode meta %d is not equal to required %d",
+        "The number of timecode meta %d is superior to required %d",
         num_meta, num_clock_ts);
 
     return NULL;
   }
 
   GST_LOG_OBJECT (h264parse,
-      "The number of timecode meta %d is equal", num_meta);
+      "The number of timecode meta %d is compatible", num_meta);
 
   memset (&sei, 0, sizeof (GstH264SEIMessage));
   sei.payloadType = GST_H264_SEI_PIC_TIMING;