[vlc-commits] Revert "demux: ogg: don't recreate decoders on same chained streams."

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


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Dec 24 13:38:18 2013 +0100| [5151a5d2196baccfecc633c898fd253d57e314d0] | committer: Francois Cartegnie

Revert "demux: ogg: don't recreate decoders on same chained streams."

This reverts commit 1f9c34275de478339dc4d750b8c62f1019303897.

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

 modules/demux/ogg.c |   18 +++++-------------
 modules/demux/ogg.h |    2 +-
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 839672a..4fea06a 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -1296,9 +1296,9 @@ static void Ogg_DecodePacket( demux_t *p_demux,
             p_block->i_buffer = 0;
     }
 
-    if ( p_stream->b_reusing_with_other_fmt )
+    if ( p_stream->b_reusing )
     {
-        p_stream->b_reusing_with_other_fmt = false;
+        p_stream->b_reusing = false;
         p_block->i_flags |= BLOCK_FLAG_DISCONTINUITY;
     }
 
@@ -1872,19 +1872,13 @@ static void Ogg_CreateES( demux_t *p_demux )
                 p_stream->b_finished = false;
                 p_stream->b_reinit = false;
                 p_stream->b_initializing = false;
-
+                p_stream->b_reusing = true;
                 es_format_Copy( &p_stream->fmt_old, &p_old_stream->fmt );
 
-                if ( !es_format_IsSimilar( &p_stream->fmt_old, &p_old_stream->fmt ) )
-                {
-                    msg_Dbg( p_demux, "recreating decoders using SET_FMT" );
-                    es_out_Control( p_demux->out, ES_OUT_SET_ES_FMT,
-                                    p_stream->p_es, &p_stream->fmt );
-                    p_stream->b_reusing_with_other_fmt = true;
-                }
-
                 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 );
             }
             else
             {
@@ -1909,8 +1903,6 @@ static void Ogg_CreateES( demux_t *p_demux )
     }
 }
 
-
-
 /****************************************************************************
  * Ogg_BeginningOfStream: Look for Beginning of Stream ogg pages and add
  *                        Elementary streams.
diff --git a/modules/demux/ogg.h b/modules/demux/ogg.h
index 3f527f9..a2d547a 100644
--- a/modules/demux/ogg.h
+++ b/modules/demux/ogg.h
@@ -75,7 +75,7 @@ typedef struct logical_stream_s
     bool b_initializing;
     bool b_finished;
     bool b_reinit;
-    bool b_reusing_with_other_fmt;
+    bool b_reusing;
     bool b_oggds;
     int i_granule_shift;
 



More information about the vlc-commits mailing list