[vlc-commits] input: Preparse: fetch sub items if item is a playlist
Thomas Guillem
git at videolan.org
Tue Jan 20 11:20:53 CET 2015
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jan 20 10:46:28 2015 +0100| [4bc33dbc16a4dc749c006a58ddb8701d1a146ec9] | committer: Jean-Baptiste Kempf
input: Preparse: fetch sub items if item is a playlist
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4bc33dbc16a4dc749c006a58ddb8701d1a146ec9
---
src/input/input.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/input/input.c b/src/input/input.c
index 48e085d..4e9fb49 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -192,8 +192,19 @@ int input_Preparse( vlc_object_t *p_parent, input_item_t *p_item )
if( !p_input )
return VLC_EGENERIC;
- if( !Init( p_input ) )
+ if( !Init( p_input ) ) {
+ /* if the demux is a playlist, call Mainloop that will call
+ * demux_Demux in order to fetch sub items */
+ bool b_is_playlist = false;
+
+ if ( demux_Control( p_input->p->input.p_demux,
+ DEMUX_IS_PLAYLIST,
+ &b_is_playlist ) )
+ b_is_playlist = false;
+ if( b_is_playlist )
+ MainLoop( p_input, false );
End( p_input );
+ }
vlc_object_release( p_input );
More information about the vlc-commits
mailing list