]> git.sesse.net Git - vlc/commitdiff
Revert "input: Fill in the input_item es"
authorRafaël Carré <rafael.carre@gmail.com>
Tue, 23 Nov 2010 17:28:52 +0000 (18:28 +0100)
committerRafaël Carré <rafael.carre@gmail.com>
Tue, 23 Nov 2010 17:28:52 +0000 (18:28 +0100)
This reverts commit eea468e632fe620228778b01bec36468222556bc.

When the media is played, the formats represent decoder output, and the ids are not preserved (video ES can be replaced by audio ES)

src/input/es_out.c
src/input/item.c
src/input/item.h

index 788f338c43e50375cab6c9a4c08e13d8cfa2f511..635b2e9893e310cd60edef9842e26e9c1ccc8da0 100644 (file)
@@ -45,7 +45,6 @@
 #include "es_out.h"
 #include "event.h"
 #include "info.h"
-#include "item.h"
 
 #include "../stream_output/stream_output.h"
 
@@ -2856,8 +2855,6 @@ static void EsOutUpdateInfo( es_out_t *out, es_out_id_t *es, const es_format_t *
     const es_format_t *p_fmt_es = &es->fmt;
     lldiv_t         div;
 
-    input_item_UpdateTracksInfo(input_GetItem(p_input), fmt);
-
     /* Create category */
     char psz_cat[128];
     snprintf( psz_cat, sizeof(psz_cat),_("Stream %d"), es->i_meta_id );
index e47a1e156d5b8b2087f4468f8adc7ef3ae9c8863..0d374afc22f77a0eff14fc4bcf3d80003573da32 100644 (file)
@@ -1050,35 +1050,3 @@ void input_item_node_PostAndDelete( input_item_node_t *p_root )
 
   input_item_node_Delete( p_root );
 }
-
-/* Called by es_out when a new Elementary Stream is added or updated. */
-void input_item_UpdateTracksInfo(input_item_t *item, const es_format_t *fmt)
-{
-    int i;
-    es_format_t *fmt_copy = malloc(sizeof *fmt_copy);
-    if (!fmt_copy)
-        return;
-
-    es_format_Copy(fmt_copy, fmt);
-    /* XXX: we could free p_extra to save memory, we will likely not need
-     * the decoder specific data */
-
-    vlc_mutex_lock( &item->lock );
-
-    for( i = 0; i < item->i_es; i++ )
-    {
-        if (item->es[i]->i_id != fmt->i_id)
-            continue;
-
-        /* We've found the right ES, replace it */
-        es_format_Clean(item->es[i]);
-        free(item->es[i]);
-        item->es[i] = fmt_copy;
-        vlc_mutex_unlock( &item->lock );
-        return;
-    }
-
-    /* ES not found, insert it */
-    TAB_APPEND(item->i_es, item->es, fmt_copy);
-    vlc_mutex_unlock( &item->lock );
-}
index 9b021366f9b59b73ef7e3300c548e79811e5691c..cd231f87ab3cc05a6501756d443963b4a3ae306b 100644 (file)
@@ -27,6 +27,5 @@
 #include "input_interface.h"
 
 void input_item_SetErrorWhenReading( input_item_t *p_i, bool b_error );
-void input_item_UpdateTracksInfo( input_item_t *item, const es_format_t *fmt );
 
 #endif