mirror of
https://code.videolan.org/videolan/vlc
synced 2024-08-27 04:21:53 +02:00
libvlc: Properly raise an exception if something goes wrong in libvlc_media_get_duration and libvlc_media_is_preparsed.
This commit is contained in:
parent
303e9b5405
commit
7aca2b195b
@ -519,14 +519,13 @@ libvlc_media_get_duration( libvlc_media_t * p_md,
|
||||
{
|
||||
VLC_UNUSED(p_e);
|
||||
|
||||
if( p_md && p_md->p_input_item)
|
||||
{
|
||||
return input_item_GetDuration( p_md->p_input_item );
|
||||
}
|
||||
else
|
||||
if( !p_md || !p_md->p_input_item)
|
||||
{
|
||||
libvlc_exception_raise( p_e, "No input item" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
return input_item_GetDuration( p_md->p_input_item );
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@ -538,14 +537,13 @@ libvlc_media_is_preparsed( libvlc_media_t * p_md,
|
||||
{
|
||||
VLC_UNUSED(p_e);
|
||||
|
||||
if( p_md && p_md->p_input_item)
|
||||
{
|
||||
return input_item_IsPreparsed( p_md->p_input_item );
|
||||
}
|
||||
else
|
||||
if( !p_md || !p_md->p_input_item)
|
||||
{
|
||||
libvlc_exception_raise( p_e, "No input item" );
|
||||
return false;
|
||||
}
|
||||
|
||||
return input_item_IsPreparsed( p_md->p_input_item );
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user