diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2011-01-27 12:16:46 +0100 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2011-01-27 12:27:38 +0100 |
commit | cb76a13cc98367b955c8e2a02c4d4dacd2a5bd04 (patch) | |
tree | 911b497ba923510447e019cf5f8d0f7743a01d08 | |
parent | 0add79cbf1612b8a3cdcb8ea0ad41f1e6059282e (diff) |
qtdemux: mind rounding issues when converting from global time to mov time
In particular, this avoids missing the intended keyframe when first converting
from the frame's mov time to global segment time, and then back from global
time to mov time when activating the segment.
-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 2076ba927..b6457ce28 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -848,7 +848,8 @@ gst_qtdemux_find_index (GstQTDemux * qtdemux, QtDemuxStream * str, guint32 index; /* 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); result = gst_util_array_binary_search (str->samples, str->stbl_index + 1, sizeof (QtDemuxSample), (GCompareDataFunc) find_func, |