From 492cafdbc14460e142b00feefd731a46646ac595 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Thu, 3 Jan 2013 13:05:47 +0100 Subject: [PATCH] decoder: always use the calculated presentation timestamp. Use PTS value computed by the decoder, which could also be derived from the GstVideoCodecFrame PTS. This makes it possible to fix up the PTS if the original one was miscomputed or only represented a DTS instead. --- gst-libs/gst/vaapi/gstvaapidecoder_objects.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_objects.c b/gst-libs/gst/vaapi/gstvaapidecoder_objects.c index eb6a83f01c..efc95a3ba9 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_objects.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_objects.c @@ -319,8 +319,7 @@ gst_vaapi_picture_output(GstVaapiPicture *picture) gst_video_codec_frame_set_user_data(out_frame, proxy, (GDestroyNotify)gst_vaapi_mini_object_unref); - if (!GST_CLOCK_TIME_IS_VALID(out_frame->pts)) - out_frame->pts = picture->pts; + out_frame->pts = picture->pts; if (GST_VAAPI_PICTURE_IS_SKIPPED(picture)) GST_VIDEO_CODEC_FRAME_FLAG_SET(out_frame, GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY);