[vlc-commits] demux: ogg: reuse decoders when fmt is compatible (fix #5394)

Francois Cartegnie git at videolan.org
Mon Dec 30 15:42:10 CET 2013


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Dec 27 17:34:02 2013 +0100| [218e5b8a84793188fc537fb75e4b07560f4a0bf2] | committer: Francois Cartegnie

demux: ogg: reuse decoders when fmt is compatible (fix #5394)

Avoids rebuffering.
Wrong way reverted by 1d6f8d8174d4e2c704732f7ec13c71df6dd8950d

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

 modules/demux/ogg.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 4088773..6fe9228 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -1845,12 +1845,16 @@ static void Ogg_CreateES( demux_t *p_demux )
                 p_stream->b_finished = false;
                 p_stream->b_reinit = false;
                 p_stream->b_initializing = false;
+                bool b_resetdecoder = Ogg_LogicalStreamResetEsFormat( p_demux, p_stream );
                 es_format_Copy( &p_stream->fmt_old, &p_old_stream->fmt );
 
                 p_old_stream->p_es = NULL;
                 p_old_stream = NULL;
-                es_out_Control( p_demux->out, ES_OUT_SET_ES_FMT,
-                                p_stream->p_es, &p_stream->fmt );
+                if ( b_resetdecoder )
+                {
+                    es_out_Control( p_demux->out, ES_OUT_SET_ES_FMT,
+                                    p_stream->p_es, &p_stream->fmt );
+                }
             }
             else
             {



More information about the vlc-commits mailing list