summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatej Knopp <matej.knopp@gmail.com>2014-11-22 21:51:33 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-11-24 11:50:07 +0100
commitde347016c645704bb847a488c36bb56759f69c5e (patch)
tree27cc6ef2e2e0ba23c35f64f7ca63c76f3d4c8cd4
parentee86097d7d05a95bd444ab981e2af88551f153b8 (diff)
videoencoder: don't complain about PTS != DTS on keyframes
It is valid for streams with b-frames https://bugzilla.gnome.org/show_bug.cgi?id=740556
-rw-r--r--gst-libs/gst/video/gstvideoencoder.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gst-libs/gst/video/gstvideoencoder.c b/gst-libs/gst/video/gstvideoencoder.c
index 684f5567e..614ba2d61 100644
--- a/gst-libs/gst/video/gstvideoencoder.c
+++ b/gst-libs/gst/video/gstvideoencoder.c
@@ -1970,11 +1970,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 != DTS");
}
} else {
GST_BUFFER_FLAG_SET (frame->output_buffer, GST_BUFFER_FLAG_DELTA_UNIT);