[vlc-commits] stream_filter: smooth: get rid of es->index->es

Francois Cartegnie git at videolan.org
Mon Nov 10 12:59:23 CET 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Nov  9 19:32:16 2014 +0100| [f88ab15dd2667a820833eef7586f79d80325a8d5] | committer: Francois Cartegnie

stream_filter: smooth: get rid of es->index->es

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

 modules/stream_filter/smooth/downloader.c |    7 -------
 modules/stream_filter/smooth/smooth.h     |    2 --
 modules/stream_filter/smooth/utils.c      |   30 -----------------------------
 3 files changed, 39 deletions(-)

diff --git a/modules/stream_filter/smooth/downloader.c b/modules/stream_filter/smooth/downloader.c
index 84d2306..1216f20 100644
--- a/modules/stream_filter/smooth/downloader.c
+++ b/modules/stream_filter/smooth/downloader.c
@@ -482,13 +482,6 @@ static int Download( stream_t *s, sms_stream_t *sms )
     assert( sms->p_nextdownload->data == NULL );
     assert( sms->current_qlvl );
 
-    int index = es_cat_to_index( sms->type );
-    if ( unlikely( index == -1 ) )
-    {
-        msg_Err( s, "invalid stream type" );
-        return VLC_EGENERIC;
-    }
-
     chunk_t *chunk = sms->p_nextdownload;
     if( !chunk )
     {
diff --git a/modules/stream_filter/smooth/smooth.h b/modules/stream_filter/smooth/smooth.h
index 4377b90..98a06fa 100644
--- a/modules/stream_filter/smooth/smooth.h
+++ b/modules/stream_filter/smooth/smooth.h
@@ -188,7 +188,5 @@ void sms_Free( sms_stream_t *);
 uint8_t *decode_string_hex_to_binary( const char * );
 sms_stream_t * sms_get_stream_by_cat( stream_sys_t *, int );
 bool no_more_chunks( stream_sys_t * );
-int index_to_es_cat( int );
-int es_cat_to_index( int );
 void resetChunksState( stream_sys_t * );
 #endif
diff --git a/modules/stream_filter/smooth/utils.c b/modules/stream_filter/smooth/utils.c
index 195c028..5ac45da 100644
--- a/modules/stream_filter/smooth/utils.c
+++ b/modules/stream_filter/smooth/utils.c
@@ -200,36 +200,6 @@ sms_stream_t * sms_get_stream_by_cat( stream_sys_t *p_sys, int i_cat )
     return NULL;
 }
 
-int es_cat_to_index( int i_cat )
-{
-    switch( i_cat )
-    {
-        case VIDEO_ES:
-            return 0;
-        case AUDIO_ES:
-            return 1;
-        case SPU_ES:
-            return 2;
-        default:
-            return -1;
-    }
-}
-
-int index_to_es_cat( int index )
-{
-    switch( index )
-    {
-        case 0:
-            return VIDEO_ES;
-        case 1:
-            return AUDIO_ES;
-        case 2:
-            return SPU_ES;
-        default:
-            return -1;
-    }
-}
-
 bool no_more_chunks( stream_sys_t *p_sys )
 {
     FOREACH_ARRAY( sms_stream_t *sms, p_sys->sms_selected );



More information about the vlc-commits mailing list