[vlc-commits] demux: asf: preroll to seek time from index keyframes (fix #7890)

Francois Cartegnie git at videolan.org
Sat Nov 23 13:26:32 CET 2013


vlc/vlc-2.1 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Nov 22 13:33:04 2013 +0100| [66fbea9be4fc842a77291021c96f8c581ced826d] | committer: Jean-Baptiste Kempf

demux: asf: preroll to seek time from index keyframes (fix #7890)

(cherry picked from commit 58c8f9f3cef168df4adfe5e1ca14cc745f4ba7fc)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=66fbea9be4fc842a77291021c96f8c581ced826d
---

 modules/demux/asf/asf.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index 05bb108..daed981 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -261,7 +261,13 @@ static int SeekIndex( demux_t *p_demux, mtime_t i_date, float f_pos )
 
     uint64_t i_offset = (uint64_t)p_index->index_entry[i_entry].i_packet_number *
                         p_sys->p_fp->i_min_data_packet_size;
-    return stream_Seek( p_demux->s, p_sys->i_data_begin + i_offset );
+
+    if ( stream_Seek( p_demux->s, p_sys->i_data_begin + i_offset ) == VLC_SUCCESS )
+    {
+        es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TS_0 + i_date );
+        return VLC_SUCCESS;
+    }
+    else return VLC_EGENERIC;
 }
 
 static void SeekPrepare( demux_t *p_demux )



More information about the vlc-commits mailing list