]> git.sesse.net Git - vlc/blobdiff - src/libvlc.c
playlist: fix callback leak
[vlc] / src / libvlc.c
index 21f9d4a1614cb576fb1ecc58bbb5ea53055ac79e..946ce2e3f199ffa89bd0a746e07dcf249dbb2b71 100644 (file)
 static void GetFilenames  ( libvlc_int_t *, unsigned, const char *const [] );
 
 /**
- * Allocate a libvlc instance, initialize global data if needed
- * It also initializes the threading system
+ * Allocate a blank libvlc instance, also setting the exit handler.
+ * Vlc's threading system must have been initialized first
  */
 libvlc_int_t * libvlc_InternalCreate( void )
 {
     libvlc_int_t *p_libvlc;
     libvlc_priv_t *priv;
 
-    /* Now that the thread system is initialized, we don't have much, but
-     * at least we have variables */
     /* Allocate a libvlc instance object */
     p_libvlc = vlc_custom_create( (vlc_object_t *)NULL, sizeof (*priv),
                                   "libvlc" );
@@ -621,14 +619,15 @@ static void GetFilenames( libvlc_int_t *p_vlc, unsigned n,
  * Requests extraction of the meta data for an input item (a.k.a. preparsing).
  * The actual extraction is asynchronous.
  */
-int libvlc_MetaRequest(libvlc_int_t *libvlc, input_item_t *item)
+int libvlc_MetaRequest(libvlc_int_t *libvlc, input_item_t *item,
+                       input_item_meta_request_option_t i_options)
 {
     libvlc_priv_t *priv = libvlc_priv(libvlc);
 
     if (unlikely(priv->parser == NULL))
         return VLC_ENOMEM;
 
-    playlist_preparser_Push(priv->parser, item);
+    playlist_preparser_Push(priv->parser, item, i_options);
     return VLC_SUCCESS;
 }
 
@@ -636,13 +635,14 @@ int libvlc_MetaRequest(libvlc_int_t *libvlc, input_item_t *item)
  * Requests retrieving/downloading art for an input item.
  * The retrieval is performed asynchronously.
  */
-int libvlc_ArtRequest(libvlc_int_t *libvlc, input_item_t *item)
+int libvlc_ArtRequest(libvlc_int_t *libvlc, input_item_t *item,
+                      input_item_meta_request_option_t i_options)
 {
     libvlc_priv_t *priv = libvlc_priv(libvlc);
 
     if (unlikely(priv->parser == NULL))
         return VLC_ENOMEM;
 
-    playlist_preparser_fetcher_Push(priv->parser, item);
+    playlist_preparser_fetcher_Push(priv->parser, item, i_options);
     return VLC_SUCCESS;
 }