GstBuffer *outbuf;
GstFlowReturn ret = GST_FLOW_OK;
guint length;
- guint64 cstart, cstop;
+ guint64 cstart = GST_CLOCK_TIME_NONE, cstop = GST_CLOCK_TIME_NONE;
gboolean PAL, wide;
dvdec = GST_DVDEC (parent);
GST_BUFFER_OFFSET (outbuf) = GST_BUFFER_OFFSET (buf);
GST_BUFFER_OFFSET_END (outbuf) = GST_BUFFER_OFFSET_END (buf);
- GST_BUFFER_TIMESTAMP (outbuf) = cstart;
- GST_BUFFER_DURATION (outbuf) = cstop - cstart;
+
+ /* FIXME : Compute values when using non-TIME segments,
+ * but for the moment make sure we at least don't set bogus values
+ */
+ if (GST_CLOCK_TIME_IS_VALID (cstart)) {
+ GST_BUFFER_TIMESTAMP (outbuf) = cstart;
+ if (GST_CLOCK_TIME_IS_VALID (cstop))
+ GST_BUFFER_DURATION (outbuf) = cstop - cstart;
+ }
ret = gst_pad_push (dvdec->srcpad, outbuf);