libs/gst/base/gstbasesink.c: If nothing else can be used, use the last buffer's start time as the segment's last stop...

Original commit message from CVS:
Patch by: Sjoerd Simons <sjoerd at luon dot net>
* 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.
This commit is contained in:
Sjoerd Simons 2008-05-22 08:33:27 +00:00 committed by Sebastian Dröge
parent 1d5691d033
commit 98faaeb7f4
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2008-05-22 Sebastian Dröge <slomo@circular-chaos.org>
Patch by: Sjoerd Simons <sjoerd at luon dot net>
* 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 <tim.muller at collabora co uk>
* gst/gstpad.c: (gst_pad_alloc_buffer_full):

View file

@ -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,