Commit 415d10cd authored by Michael Tänzer's avatar Michael Tänzer Committed by Jean-Baptiste Kempf

demux: ogg: seek to the position returned by OggBisectSearchByTime()

If the packet starting at i_pagepos is larger than a page, i_input_position
will point to the last of those pages and we need to seek to the first one.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 52a6dc02
...@@ -1011,6 +1011,7 @@ int Oggseek_SeektoAbsolutetime( demux_t *p_demux, logical_stream_t *p_stream, ...@@ -1011,6 +1011,7 @@ int Oggseek_SeektoAbsolutetime( demux_t *p_demux, logical_stream_t *p_stream,
{ {
/* be sure to clear any state or read+pagein() will fail on same # */ /* be sure to clear any state or read+pagein() will fail on same # */
ogg_stream_reset( &p_stream->os ); ogg_stream_reset( &p_stream->os );
p_sys->i_input_position = i_pagepos;
seek_byte( p_demux, p_sys->i_input_position ); seek_byte( p_demux, p_sys->i_input_position );
} }
/* Insert keyframe position into index */ /* Insert keyframe position into index */
......
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