[vlc-devel] VLC returning incorrect play status

Peter Tap ptrtap at yahoo.com
Thu Mar 28 12:46:44 CET 2013


Folks,

We control VLC play, stop, etc. using rc commands (modules/control/rc.c). For our specific case, I had added a new rc "extendedstatus" command.

Occasionally, vlc would complete the .mp4 file being played but would still indicate a "play" status (as returned by playlist_Status()).

In my extended status logic, I check if there is a current input available:

   p_input = playlist_CurrentInput()

If the .mp4 file is completed, p_input must return NULL. However, this doesn't seem to be the case. 


Looking at rc.c, it appears I should also check for p_input->b_dead. 

Is this right?

If it is, is the following logic right?

p_input = playlist_CurrentInput();

if (p_input) {
   if (p_input->b_dead || !vlc_object_alive(p_input)) {
        vlc_object_release(p_input);
        p_input = NULL;
   }
}


Thank you in advance for your help.

Regards,
Peter



More information about the vlc-devel mailing list