]> git.sesse.net Git - vlc/blobdiff - modules/demux/playlist/zpl.c
shoutcast: Fix some leaks.
[vlc] / modules / demux / playlist / zpl.c
index 43875338f20ffd7a7431b0abb5448000707c5c17..8d64afc47ff36a56a35e31629c04487a68dc1825 100644 (file)
@@ -53,8 +53,6 @@ static char* ParseTabValue(char* psz_string);
 int Import_ZPL( vlc_object_t *p_this )
 {
     demux_t *p_demux = (demux_t *)p_this;
-    const uint8_t *p_peek;
-    CHECK_PEEK( p_peek, 8 );
 
     if(! ( demux_IsPathExtension( p_demux, ".zpl" ) || demux_IsForced( p_demux,  "zpl" )))
         return VLC_EGENERIC;
@@ -76,18 +74,6 @@ void Close_ZPL( vlc_object_t *p_this )
     free( p_demux->p_sys );
 }
 
-static inline void MaybeFromLocaleRep (char **str)
-{
-    char *const orig_str = *str;
-
-    if ((orig_str != NULL) && !IsUTF8 (orig_str))
-    {
-        *str = FromLocaleDup (orig_str);
-        free (orig_str);
-    }
-}
-
-
 static int Demux( demux_t *p_demux )
 {
     char       *psz_line;
@@ -99,7 +85,7 @@ static int Demux( demux_t *p_demux )
          *psz_description = NULL, *psz_url = NULL,        *psz_copyright = NULL,
          *psz_mrl = NULL;
 
-    INIT_PLAYLIST_STUFF;
+    input_item_t *p_current_input = GetCurrentItem(p_demux);
 
     psz_line = stream_ReadLine( p_demux->s );
     char *psz_parse = psz_line;
@@ -134,8 +120,6 @@ static int Demux( demux_t *p_demux )
             if( !EMPTY_STR(psz_tabvalue) )
             {
                 psz_mrl = ProcessMRL( psz_tabvalue, p_demux->p_sys->psz_prefix );
-                if( psz_mrl )
-                    MaybeFromLocaleRep( &psz_mrl );
             }
             free( psz_tabvalue );
         }
@@ -214,7 +198,7 @@ static int Demux( demux_t *p_demux )
         psz_line = stream_ReadLine( p_demux->s );
     }
 
-    HANDLE_PLAY_AND_RELEASE;
+    vlc_gc_decref(p_current_input);
     var_Destroy( p_demux, "zpl-extvlcopt" );
     return 0; /* Needed for correct operation of go back */
 }