Commit c6e4db8d authored by Pierre's avatar Pierre
Browse files

libvlc: Make sure calling get_duration() triggers preparsing and returns -1 if duration is unknown.

parent 4ea2ec4b
......@@ -592,6 +592,11 @@ libvlc_media_get_duration( libvlc_media_t * p_md, libvlc_exception_t *p_e )
return -1;
}
preparse_if_needed( p_md );
if (!input_item_IsPreparsed( p_md->p_input_item ))
return -1;
return input_item_GetDuration( p_md->p_input_item ) / 1000;
}
......
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