Commit 5412a976 authored by Olivier Aubert's avatar Olivier Aubert
Browse files

control/core.c: raise exceptions in get_media_position

parent 3fe47215
...@@ -117,20 +117,15 @@ mediacontrol_get_media_position( mediacontrol_Instance *self, ...@@ -117,20 +117,15 @@ mediacontrol_get_media_position( mediacontrol_Instance *self,
if( ! p_input ) if( ! p_input )
{ {
/* RAISE( mediacontrol_InternalException, "No input thread." );
RAISE( mediacontrol_InternalException, "No input thread." ); return NULL;
return( NULL );
*/
retval->value = 0;
return retval;
} }
if( an_origin == mediacontrol_RelativePosition if( an_origin != mediacontrol_AbsolutePosition )
|| an_origin == mediacontrol_ModuloPosition )
{ {
/* Relative or ModuloPosition make no sense */ /* Relative or ModuloPosition make no sense */
retval->value = 0; RAISE( mediacontrol_PositionOriginNotSupported, "Only absolute position is valid." );
return retval; return NULL;
} }
/* We are asked for an AbsolutePosition. */ /* We are asked for an AbsolutePosition. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment