From d7ee6a9c57071430dde227d2846b7a8f44aaddc0 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Thu, 7 Jun 2012 16:50:17 +0100 Subject: [PATCH] videodecoder: do not do timestamp arithmetic from an invalid timestamp This fixes untimestampped buffers from being rejected by the segment clipper. https://bugzilla.gnome.org/show_bug.cgi?id=676022 --- gst-libs/gst/video/gstvideodecoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index fb3c8d6..01c24ac 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -1997,7 +1997,7 @@ gst_video_decoder_finish_frame (GstVideoDecoder * decoder, /* Check for clipping */ start = frame->pts; - stop = frame->pts + frame->duration; + stop = start >= 0 ? frame->pts + frame->duration : GST_CLOCK_TIME_NONE; segment = &decoder->output_segment; if (gst_segment_clip (segment, GST_FORMAT_TIME, start, stop, &start, &stop)) { -- 2.7.4