[vlc-devel] [PATCH 2/2] demux: flac: Create the es_out early

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Dec 14 19:27:47 CET 2016


This allows a preparse to know about the audio track
---
 modules/demux/flac.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/modules/demux/flac.c b/modules/demux/flac.c
index 694fdc2..0f5b21f 100644
--- a/modules/demux/flac.c
+++ b/modules/demux/flac.c
@@ -170,6 +170,8 @@ static int Open( vlc_object_t * p_this )
                   p_sys->attachments[p_sys->i_cover_idx]->psz_name );
         vlc_meta_Set( p_sys->p_meta, vlc_meta_ArtworkURL, psz_url );
     }
+    p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_out);
+
     return VLC_SUCCESS;
 error:
     Close( p_this );
@@ -233,11 +235,6 @@ static int Demux( demux_t *p_demux )
 
             p_block_out->p_next = NULL;
 
-            if( p_sys->p_es == NULL )
-            {
-                p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_out);
-            }
-
             p_sys->i_pts = p_block_out->i_dts;
 
             /* set PCR */
-- 
2.10.2



More information about the vlc-devel mailing list