1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-24 20:48:52 +02:00

control/media_instance.c: Work around a missing playlist feature: Playlist should increment the input refcount, and destroy it based upon its refcount value. (this is a temporary hack to allow libvlc usage, until we fix the playlist).

This commit is contained in:
Pierre d'Herbemont 2007-07-14 20:54:33 +00:00
parent 1a723b1aa9
commit fc12cd71fb

View File

@ -60,6 +60,13 @@ static void release_input_thread( libvlc_media_instance_t *p_mi )
/* No one is tracking this input_thread appart us. Destroy it */
if( should_destroy )
input_DestroyThread( p_input_thread );
else
{
/* XXX: hack the playlist doesn't retain the input thread,
* so we did it for the playlist (see _new_from_input_thread),
* revert that here. */
vlc_object_release( p_input_thread );
}
}
/*
@ -197,6 +204,10 @@ libvlc_media_instance_t * libvlc_media_instance_new_from_input_thread(
/* will be released in media_instance_release() */
vlc_object_yield( p_input );
/* XXX: Hack as the playlist doesn't yield the input thread we retain
* the input for the playlist. (see corresponding hack in _release) */
vlc_object_yield( p_input );
return p_mi;
}