]> git.sesse.net Git - vlc/blobdiff - modules/demux/playlist/gvp.c
Qt4: don't reset rate when input changes
[vlc] / modules / demux / playlist / gvp.c
index 19d6d3702b44b5425350b0e7753e4b2672d2160e..2747d985c2f66ce94c93b20b21e8c3aef5e538bd 100644 (file)
@@ -96,7 +96,9 @@ int Import_GVP( vlc_object_t *p_this )
     STANDARD_DEMUX_INIT_MSG(  "using Google Video Playlist (gvp) import" );
     p_demux->pf_control = Control;
     p_demux->pf_demux = Demux;
-    MALLOC_ERR( p_demux->p_sys, demux_sys_t );
+    p_demux->p_sys = malloc( sizeof( demux_sys_t ) );
+    if( !p_demux->p_sys )
+        return VLC_ENOMEM;
 
     return VLC_SUCCESS;
 }
@@ -127,7 +129,9 @@ static int Demux( demux_t *p_demux )
     char *psz_description = NULL;
     input_item_t *p_input;
 
-    INIT_PLAYLIST_STUFF;
+    input_item_t *p_current_input = GetCurrentItem(p_demux);
+
+    input_item_node_t *p_subitems = input_item_node_Create( p_current_input );
 
     p_sys->p_current_input = p_current_input;
 
@@ -200,18 +204,19 @@ static int Demux( demux_t *p_demux )
     }
     else
     {
-        p_input = input_item_NewExt( p_demux,
-                                    psz_url, psz_title, 0, NULL, -1 );
+        p_input = input_item_New( p_demux, psz_url, psz_title );
 #define SADD_INFO( type, field ) if( field ) { input_item_AddInfo( \
-                    p_input, _("Google Video"), _(type), "%s", field ) ; }
+                    p_input, _("Google Video"), type, "%s", field ) ; }
         SADD_INFO( "gvp_version", psz_version );
         SADD_INFO( "docid", psz_docid );
         SADD_INFO( "description", psz_description );
-        input_item_AddSubItem( p_current_input, p_input );
+        input_item_node_AppendItem( p_subitems, p_input );
         vlc_gc_decref( p_input );
     }
 
-    HANDLE_PLAY_AND_RELEASE;
+    input_item_node_PostAndDelete( p_subitems );
+
+    vlc_gc_decref(p_current_input);
 
     free( psz_version );
     free( psz_url );