diff options
author | Robert Swain <robert.swain@collabora.co.uk> | 2010-05-25 21:14:05 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2010-05-26 00:08:16 +0100 |
commit | 50273537dcc5a557fee3b24c9b0baf9abb4e5900 (patch) | |
tree | ef8b6301f9ac2b5d805b3e19dc6cef87c791989c | |
parent | 6a9983cd20c48b96396229b3f94d0254a05ddf48 (diff) |
qtdemux: Round timestamp up when scaling to mov format
Fix timestamp rounding to allow the correct index to be located.
The issue was that scaling from GStreamer time format to mov time format was
rounding down causing the timestamp of the newsegment event received after a
flushing keyframe seek to find the sample index before the one it should
causing further backward seeking to the keyframe prior until no rounding error
occurred.
Rounding up when scaling to mov format has the desired effect, and it is
not clear whether just the _round () variant would be sufficient.
Fixes bug #619105
-rw-r--r-- | gst/qtdemux/qtdemux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index b5ad50c24..b88d39923 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -817,7 +817,8 @@ gst_qtdemux_find_index_linear (GstQTDemux * qtdemux, QtDemuxStream * str, guint32 index = 0; /* convert media_time to mov format */ - media_time = gst_util_uint64_scale (media_time, str->timescale, GST_SECOND); + media_time = + gst_util_uint64_scale_ceil (media_time, str->timescale, GST_SECOND); if (media_time == result->timestamp) return index; |