mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
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
This commit is contained in:
parent
b9bee1af8c
commit
9d349d8831
1 changed files with 1 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue