X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcontrol%2Fmediacontrol_core.c;h=9281ac06eb95e6292ca4703e0824c4ec572cdb59;hb=9ee093515ab379c5215e243b07563a9e8f5fb40d;hp=67a4cbef8168099596e5100b0ca1c0dffbf5fa0a;hpb=409327e9602e9d8a26e35b3ac4b97604d4790429;p=vlc diff --git a/src/control/mediacontrol_core.c b/src/control/mediacontrol_core.c index 67a4cbef81..9281ac06eb 100644 --- a/src/control/mediacontrol_core.c +++ b/src/control/mediacontrol_core.c @@ -346,7 +346,14 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self, } p_media = libvlc_media_player_get_media( self->p_media_player, &ex ); - HANDLE_LIBVLC_EXCEPTION_NULL( &ex ); + if( libvlc_exception_raised( &ex ) ) + { + free( retval ); + RAISE( mediacontrol_InternalException, libvlc_errmsg( ) ); + libvlc_exception_clear( &ex ); + return NULL; + } + if( ! p_media ) { /* No p_media defined */ @@ -358,8 +365,16 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self, else { libvlc_state_t state; + state = libvlc_media_player_get_state( self->p_media_player, &ex ); - HANDLE_LIBVLC_EXCEPTION_NULL( &ex ); + if( libvlc_exception_raised( &ex ) ) + { + free( retval ); + RAISE( mediacontrol_InternalException, libvlc_errmsg() ); + libvlc_exception_clear( &ex ); + return NULL; + } + switch( state ) { case libvlc_NothingSpecial: