gst/base/gstbasesink.c: Don't sync on buffers that fall partially outside our current segment. Prevents an assertion ...

Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_do_sync):
Don't sync on buffers that fall partially outside our current
segment. Prevents an assertion failure/abort playing some files.
This commit is contained in:
Michael Smith 2005-11-11 15:19:37 +00:00
parent c4740f0b48
commit 6b2425e5a4
3 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2005-11-11 Michael Smith <msmith@fluendo.com>
* gst/base/gstbasesink.c: (gst_base_sink_do_sync):
Don't sync on buffers that fall partially outside our current
segment. Prevents an assertion failure/abort playing some files.
2005-11-10 Andy Wingo <wingo@pobox.com>
* check/gst/gstbin.c (test_message_state_changed_children): Style

View file

@ -1047,11 +1047,17 @@ gst_base_sink_do_sync (GstBaseSink * basesink, GstBuffer * buffer)
stream_start = (gint64) start - basesink->segment_start;
stream_end = (gint64) end - basesink->segment_start;
if (stream_start < 0) {
GST_DEBUG_OBJECT (basesink, "stream_start negative, invalid");
goto done;
}
} else {
stream_start = (gint64) start;
stream_end = (gint64) end;
}
/* correct for rate */
if (basesink->segment_rate != 0.0) {
stream_start /= ABS (basesink->segment_rate);

View file

@ -1047,11 +1047,17 @@ gst_base_sink_do_sync (GstBaseSink * basesink, GstBuffer * buffer)
stream_start = (gint64) start - basesink->segment_start;
stream_end = (gint64) end - basesink->segment_start;
if (stream_start < 0) {
GST_DEBUG_OBJECT (basesink, "stream_start negative, invalid");
goto done;
}
} else {
stream_start = (gint64) start;
stream_end = (gint64) end;
}
/* correct for rate */
if (basesink->segment_rate != 0.0) {
stream_start /= ABS (basesink->segment_rate);