videodecoder: use GST_CLOCK_TIME_IS_VALID where appropriate

This commit is contained in:
Vincent Penquerc'h 2012-06-08 13:58:51 +01:00
parent c2112cb402
commit 8b10be67e4

View file

@ -1997,7 +1997,9 @@ gst_video_decoder_finish_frame (GstVideoDecoder * decoder,
/* Check for clipping */ /* Check for clipping */
start = frame->pts; start = frame->pts;
stop = start >= 0 ? frame->pts + frame->duration : GST_CLOCK_TIME_NONE; stop =
GST_CLOCK_TIME_IS_VALID (start) ? frame->pts +
frame->duration : GST_CLOCK_TIME_NONE;
segment = &decoder->output_segment; segment = &decoder->output_segment;
if (gst_segment_clip (segment, GST_FORMAT_TIME, start, stop, &start, &stop)) { if (gst_segment_clip (segment, GST_FORMAT_TIME, start, stop, &start, &stop)) {