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).
This commit is contained in:
Edward Hervey 2006-08-28 15:57:39 +00:00
parent 4016e6c577
commit 8b6246f275
2 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,13 @@
2006-08-28 Edward Hervey <edward@fluendo.com>
* 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 <wim@fluendo.com> 2006-08-28 Wim Taymans <wim@fluendo.com>
* libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek): * libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek):

View file

@ -933,6 +933,9 @@ gst_base_sink_get_sync_times (GstBaseSink * basesink, GstMiniObject * obj,
GST_TIME_ARGS (cstop)); GST_TIME_ARGS (cstop));
} }
/* set last stop position */
gst_segment_set_last_stop (segment, GST_FORMAT_TIME, cstop);
do_times: do_times:
/* this can produce wrong values if we accumulated non-TIME segments. If this happens, /* this can produce wrong values if we accumulated non-TIME segments. If this happens,
* upstream is behaving very badly */ * upstream is behaving very badly */