Commit ed2e0913 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h Committed by Tim-Philipp Müller
Browse files

oggdemux: sparse streams aren't timed by end time, and their duration isn't implicit

Fixes timestamps and durations on Kate subtitle streams.

See http://www.xiph.org/ogg/doc/ogg-multiplex.html section 'start-time and
end-time positioning' for some more details, and bug #600929.
parent 25873a05
...@@ -591,6 +591,10 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet, ...@@ -591,6 +591,10 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet,
pad->current_granule); pad->current_granule);
out_duration = gst_util_uint64_scale (duration, out_duration = gst_util_uint64_scale (duration,
GST_SECOND * pad->map.granulerate_d, pad->map.granulerate_n); GST_SECOND * pad->map.granulerate_d, pad->map.granulerate_n);
} else if (pad->is_sparse) {
out_timestamp = gst_ogg_stream_granule_to_time (&pad->map,
pad->current_granule);
out_duration = GST_CLOCK_TIME_NONE;
} else { } else {
out_timestamp = gst_ogg_stream_granule_to_time (&pad->map, out_timestamp = gst_ogg_stream_granule_to_time (&pad->map,
pad->current_granule - duration); pad->current_granule - duration);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment