From 8b6246f275422b6848f437e887ff09bb7452fd87 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 28 Aug 2006 15:57:39 +0000 Subject: [PATCH] libs/gst/base/gstbasesink.c: Inform GstSegment of the last stop position in order for the current segment to have a p... Original commit message from CVS: * libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times): Inform GstSegment of the last stop position in order for the current segment to have a proper duration if it doesn't have a specific stop position from which a duration could be calculated. This bug was noticeable when a non-flushing, non-update new segment was followed by another segment (all buffers from the new segment were being dropped). --- ChangeLog | 10 ++++++++++ libs/gst/base/gstbasesink.c | 3 +++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index a82b7f5..18b6982 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-08-28 Edward Hervey + + * libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times): + Inform GstSegment of the last stop position in order for the current + segment to have a proper duration if it doesn't have a specific stop + position from which a duration could be calculated. + This bug was noticeable when a non-flushing, non-update new segment was + followed by another segment (all buffers from the new segment were being + dropped). + 2006-08-28 Wim Taymans * libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek): diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 3f1261c..3d29dc8 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -933,6 +933,9 @@ gst_base_sink_get_sync_times (GstBaseSink * basesink, GstMiniObject * obj, GST_TIME_ARGS (cstop)); } + /* set last stop position */ + gst_segment_set_last_stop (segment, GST_FORMAT_TIME, cstop); + do_times: /* this can produce wrong values if we accumulated non-TIME segments. If this happens, * upstream is behaving very badly */ -- 2.7.4