mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 09:08:14 +00:00
videodecoder: subtract time difference with GST_CLOCK_DIFF
To ensure the subtraction of two GstClockTime values (which are guint64) can be negative. Use GST_CLOCK_DIFF which returns a gint64. CID 1338049
This commit is contained in:
parent
a7123ebb58
commit
b81b3f07ec
1 changed files with 2 additions and 1 deletions
|
@ -2699,7 +2699,8 @@ gst_video_decoder_prepare_finish_frame (GstVideoDecoder *
|
|||
GST_DEBUG_OBJECT (decoder,
|
||||
"sync timestamp %" GST_TIME_FORMAT " diff %" GST_STIME_FORMAT,
|
||||
GST_TIME_ARGS (frame->pts),
|
||||
GST_STIME_ARGS (frame->pts - decoder->output_segment.start));
|
||||
GST_STIME_ARGS (GST_CLOCK_DIFF (frame->pts,
|
||||
decoder->output_segment.start)));
|
||||
priv->base_timestamp = frame->pts;
|
||||
priv->base_picture_number = frame->decode_frame_number;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue