videoencoder: don't complain about PTS != DTS on keyframes
authorMatej Knopp <matej.knopp@gmail.com>
Sat, 22 Nov 2014 20:51:33 +0000 (21:51 +0100)
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Sat, 22 Nov 2014 21:12:16 +0000 (16:12 -0500)
It is valid for streams with b-frames

https://bugzilla.gnome.org/show_bug.cgi?id=740556

gst-libs/gst/video/gstvideoencoder.c

index b80ee32..ec9acf1 100644 (file)
@@ -1957,13 +1957,9 @@ gst_video_encoder_finish_frame (GstVideoEncoder * encoder,
   if (GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT (frame)) {
     priv->distance_from_sync = 0;
     GST_BUFFER_FLAG_UNSET (frame->output_buffer, GST_BUFFER_FLAG_DELTA_UNIT);
-    /* For keyframes, DTS = PTS */
+    /* For keyframes, DTS = PTS, if decoder doesn't decide otherwise */
     if (!GST_CLOCK_TIME_IS_VALID (frame->dts)) {
       frame->dts = frame->pts;
-    } else if (GST_CLOCK_TIME_IS_VALID (frame->pts) && frame->pts != frame->dts) {
-      GST_WARNING_OBJECT (encoder, "keyframe PTS (%" GST_TIME_FORMAT
-          ") != DTS (%" GST_TIME_FORMAT ")", GST_TIME_ARGS (frame->pts),
-          GST_TIME_ARGS (frame->dts));
     }
   } else {
     GST_BUFFER_FLAG_SET (frame->output_buffer, GST_BUFFER_FLAG_DELTA_UNIT);