Commit 7b4ce76a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Actually initialize media_list_player

I guess nobody ever tried to use that piece of code.

N.B.: dose not apply to bugfix due to earlier non-backported bugfixes
parent 65f71aed
...@@ -168,7 +168,7 @@ struct libvlc_media_list_player_t ...@@ -168,7 +168,7 @@ struct libvlc_media_list_player_t
{ {
libvlc_event_manager_t * p_event_manager; libvlc_event_manager_t * p_event_manager;
libvlc_instance_t * p_libvlc_instance; libvlc_instance_t * p_libvlc_instance;
int i_refcount; unsigned i_refcount;
vlc_mutex_t object_lock; vlc_mutex_t object_lock;
libvlc_media_list_path_t current_playing_item_path; libvlc_media_list_path_t current_playing_item_path;
libvlc_media_t * p_current_playing_item; libvlc_media_t * p_current_playing_item;
......
...@@ -264,10 +264,13 @@ libvlc_media_list_player_new( libvlc_instance_t * p_instance, ...@@ -264,10 +264,13 @@ libvlc_media_list_player_new( libvlc_instance_t * p_instance,
if( !p_mlp ) if( !p_mlp )
return NULL; return NULL;
libvlc_retain( p_instance );
p_mlp->p_libvlc_instance = p_instance;
p_mlp->i_refcount = 0;
vlc_mutex_init( &p_mlp->object_lock );
p_mlp->current_playing_item_path = NULL; p_mlp->current_playing_item_path = NULL;
p_mlp->p_mi = NULL;
p_mlp->p_mlist = NULL; p_mlp->p_mlist = NULL;
vlc_mutex_init( &p_mlp->object_lock ); p_mlp->p_mi = NULL;
p_mlp->p_event_manager = libvlc_event_manager_new( p_mlp, p_mlp->p_event_manager = libvlc_event_manager_new( p_mlp,
p_instance, p_instance,
p_e ); p_e );
...@@ -306,6 +309,7 @@ void libvlc_media_list_player_release( libvlc_media_list_player_t * p_mlp ) ...@@ -306,6 +309,7 @@ void libvlc_media_list_player_release( libvlc_media_list_player_t * p_mlp )
} }
free( p_mlp->current_playing_item_path ); free( p_mlp->current_playing_item_path );
libvlc_release( p_mlp->p_libvlc_instance );
free( p_mlp ); free( p_mlp );
} }
......
...@@ -19,6 +19,7 @@ check_PROGRAMS = \ ...@@ -19,6 +19,7 @@ check_PROGRAMS = \
# meta: No suitable test file # meta: No suitable test file
EXTRA_PROGRAMS = \ EXTRA_PROGRAMS = \
test_libvlc_meta \ test_libvlc_meta \
test_dummy \
$(NULL) $(NULL)
#check_DATA = samples/test.sample samples/meta.sample #check_DATA = samples/test.sample samples/meta.sample
...@@ -74,6 +75,11 @@ test_libvlc_meta_LDADD = $(top_builddir)/src/libvlc.la ...@@ -74,6 +75,11 @@ test_libvlc_meta_LDADD = $(top_builddir)/src/libvlc.la
test_libvlc_meta_CFLAGS = $(CFLAGS_tests) test_libvlc_meta_CFLAGS = $(CFLAGS_tests)
test_libvlc_meta_LDFLAGS = $(LDFLAGS_tests) test_libvlc_meta_LDFLAGS = $(LDFLAGS_tests)
test_dummy_SOURCES = libvlc/test.c
test_dummy_LDADD = $(top_builddir)/src/libvlc.la
test_dummy_CFLAGS = $(CFLAGS_tests)
test_dummy_LDFLAGS = $(LDFLAGS_tests)
checkall: checkall:
$(MAKE) check_PROGRAMS="$(check_PROGRAMS) $(EXTRA_PROGRAMS)" check $(MAKE) check_PROGRAMS="$(check_PROGRAMS) $(EXTRA_PROGRAMS)" check
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment