[vlc-devel] [PATCH] - media_list (libvlc api)

brezhoneg1 brezhoneg1 at yahoo.fr
Sat Nov 22 01:09:16 CET 2008


Please, find here a list of issues that prevent media list (libvlc api)
from working properly. (Mainly things related to
"libvlc_media_list_player_next" function). A patch is provided if that
can help. (Patch tested and working)

Files are:
- include/vlc/libvlc_events.h
- src/control/core.c
- src/control/media_list_path.h
- src/control/media_list_player.c

The patch corrects the following: 

-function: "libvlc_media_list_player"
Initialization of "p_instance" was missing, leading msg_Warn to crash.

-function: "libvlc_exception_clear"
Check a NULL pointer to prevent crash to occur. (does occur)

-function: "libvlc_media_list_path_copy_by_appending"
Memory problem with memcpy (size is 4-byte too long) (crash)

-function: "libvlc_media_list_parentlist_at_path"
Missing vlc_media_list_retain for returned value.
(leads to unwanted media_list destruction and crash after some time)

-callback: "media_player_reached_end"
The callback is run by input thread and launches
"libvlc_media_list_player_next". This function tries to clean up the
input thread and start a new one. This leads to a deadlock (input thread
waiting for its own death via vlc_join).
A workaround is to run the callback in a temporary dedicated thread
(vlc_clone).

- functions: "get_next_path" and "set_current_playing_item"
Function "get_next_path" was not fully tested (missing incrementation)
Also, a one-level sublist was taken into account in both "get_next_path"
and "set_current_playing_item" leading to numerous "out-of-sync" errors.
"get_next_path" is changed to take into account multi-level sublists.
"set_current_playing_item" is made simpler to prevent these
"out-of-sync" errors.

- function: "libvlc_media_list_player_next"
An error was raised to signal a normal end of playlist.
This patch creates a new libvlc_MediaListPlayerEndReached event.
(Consistent with media_player)


Erwan10 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_medialist_libvlc_api.diff
Type: application/octet-stream
Size: 10718 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20081122/592a65e4/attachment.obj>


More information about the vlc-devel mailing list