[vlc-commits] oggseek: Reset stream after searching for the last frame

Hugo Beauzée-Luyssen git at videolan.org
Fri Sep 7 00:42:27 CEST 2012


vlc/vlc-2.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Aug  8 22:32:54 2012 +0300| [ae71018bdd17445101a22699e2b2a7cb41050f24] | committer: Rafaël Carré

oggseek: Reset stream after searching for the last frame
(cherry picked from commit 78a8771f4c69bdb2080a06f8b0c8db4d5675f6b9)

Signed-off-by: Rafaël Carré <funman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=ae71018bdd17445101a22699e2b2a7cb41050f24
---

 modules/demux/oggseek.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/demux/oggseek.c b/modules/demux/oggseek.c
index b706208..c67f8e0 100644
--- a/modules/demux/oggseek.c
+++ b/modules/demux/oggseek.c
@@ -705,6 +705,10 @@ static int64_t find_last_theora_frame ( demux_t *p_demux, logical_stream_t *p_st
      * adverse effects. */
 
     seek_byte( p_demux, 0 );
+    /* Reset stream states */
+    p_stream->i_serial_no = ogg_page_serialno( &p_demux->p_sys->current_page );
+    ogg_stream_init( &p_stream->os, p_stream->i_serial_no );
+    ogg_stream_pagein( &p_stream->os, &p_demux->p_sys->current_page );
 
     return i_frame;
 }



More information about the vlc-commits mailing list