[vlc-devel] [PATCH] libvlc_MetaRequest: increment item i_preparse_depth

Thomas Guillem thomas at gllm.fr
Wed Mar 25 16:46:25 CET 2015


libvlc_MetaRequest comes from the user, so we can increment i_preparse_depth to
force a preparsing.
---
 src/libvlc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/libvlc.c b/src/libvlc.c
index cff3784..34824da 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -608,6 +608,10 @@ int libvlc_MetaRequest(libvlc_int_t *libvlc, input_item_t *item,
     if (unlikely(priv->parser == NULL))
         return VLC_ENOMEM;
 
+    vlc_mutex_lock( &item->lock );
+    if( item->i_preparse_depth == 0 )
+        item->i_preparse_depth = 1;
+    vlc_mutex_unlock( &item->lock );
     playlist_preparser_Push(priv->parser, item, i_options);
     return VLC_SUCCESS;
 }
-- 
2.1.3




More information about the vlc-devel mailing list