PS: pass an extra block_t parameter to ps_track_fill
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 10 Aug 2014 06:15:39 +0000 (08:15 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 10 Aug 2014 06:52:53 +0000 (08:52 +0200)
This shouldn't be necessary, but there is no simple way to detect AC3
from EAC3 using the id, in the evobs

modules/access/dvdnav.c
modules/access/dvdread.c
modules/demux/ps.c
modules/demux/ps.h

index 826179e..858aab7 100644 (file)
@@ -1285,7 +1285,7 @@ static void ESNew( demux_t *p_demux, int i_id )
 
     if( tk->b_seen ) return;
 
-    if( ps_track_fill( tk, 0, i_id ) )
+    if( ps_track_fill( tk, 0, i_id, NULL ) )
     {
         msg_Warn( p_demux, "unknown codec for id=0x%x", i_id );
         return;
index bab7217..f6d9cdb 100644 (file)
@@ -650,7 +650,7 @@ static void ESNew( demux_t *p_demux, int i_id, int i_lang )
 
     if( tk->b_seen ) return;
 
-    if( ps_track_fill( tk, 0, i_id ) )
+    if( ps_track_fill( tk, 0, i_id, NULL ) )
     {
         msg_Warn( p_demux, "unknown codec for id=0x%x", i_id );
         return;
index 4126a97..b74d07d 100644 (file)
@@ -380,7 +380,7 @@ static int Demux( demux_t *p_demux )
 
             if( !tk->b_seen )
             {
-                if( !ps_track_fill( tk, &p_sys->psm, i_id ) )
+                if( !ps_track_fill( tk, &p_sys->psm, i_id, p_pkt ) )
                 {
                     tk->es = es_out_Add( p_demux->out, &tk->fmt );
                     b_new = true;
index 1377428..618c25b 100644 (file)
@@ -78,7 +78,7 @@ static inline void ps_track_init( ps_track_t tk[PS_TK_COUNT] )
 }
 
 /* From id fill i_skip and es_format_t */
-static inline int ps_track_fill( ps_track_t *tk, ps_psm_t *p_psm, int i_id )
+static inline int ps_track_fill( ps_track_t *tk, ps_psm_t *p_psm, int i_id, block_t *p_pkt )
 {
     tk->i_skip = 0;
     tk->i_id = i_id;
@@ -399,7 +399,7 @@ static inline int ps_pkt_parse_system( block_t *p_pkt, ps_psm_t *p_psm,
 
             if( !tk[i_tk].b_seen )
             {
-                if( !ps_track_fill( &tk[i_tk], p_psm, i_id ) )
+                if( !ps_track_fill( &tk[i_tk], p_psm, i_id, p_pkt ) )
                 {
                     tk[i_tk].b_seen = true;
                 }
@@ -686,7 +686,7 @@ static inline int ps_psm_fill( ps_psm_t *p_psm, block_t *p_pkt,
 
         if( !tk[i].b_seen || !tk[i].es ) continue;
 
-        if( ps_track_fill( &tk_tmp, p_psm, tk[i].i_id ) != VLC_SUCCESS )
+        if( ps_track_fill( &tk_tmp, p_psm, tk[i].i_id, p_pkt ) != VLC_SUCCESS )
             continue;
 
         if( tk_tmp.fmt.i_codec == tk[i].fmt.i_codec )