diff --git a/ChangeLog b/ChangeLog index 6a5b980647..1f6992e533 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-05-22 Sebastian Dröge + + Patch by: Sjoerd Simons + + * libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times): + If nothing else can be used, use the last buffer's start time as + the segment's last stop. Fixes bug #534258. + 2008-05-21 Tim-Philipp Müller * gst/gstpad.c: (gst_pad_alloc_buffer_full): diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 781b152146..fa63119ed1 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -1363,7 +1363,10 @@ gst_base_sink_get_sync_times (GstBaseSink * basesink, GstMiniObject * obj, } /* set last stop position */ - gst_segment_set_last_stop (segment, GST_FORMAT_TIME, cstop); + if (G_LIKELY (cstop != GST_CLOCK_TIME_NONE)) + gst_segment_set_last_stop (segment, GST_FORMAT_TIME, cstop); + else + gst_segment_set_last_stop (segment, GST_FORMAT_TIME, cstart); do_times: /* this can produce wrong values if we accumulated non-TIME segments. If this happens,