Skip to content

Commit

Permalink
Default to PARSE_LOCAL if no parse flags given
Browse files Browse the repository at this point in the history
  • Loading branch information
caprica committed Feb 2, 2024
1 parent 6e52b68 commit fee1e56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/uk/co/caprica/vlcj/media/ParseApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,13 @@ public boolean parse(ParseFlag... flags) {
* Parse the media, asynchronously, with a specific timeout and specific parse flags.
*
* @param timeout timeout, milliseconds
* @param flags parse flags
* @param flags parse flags, if omitted {@link ParseFlag#PARSE_LOCAL} is used
* @return <code>true</code> if the parse request was successful; <code>false</code> on error
*/
public boolean parse(int timeout, ParseFlag... flags) {
if (flags == null || flags.length == 0) {
flags = new ParseFlag[] {ParseFlag.PARSE_LOCAL };
}
return libvlc_media_parse_request(libvlcInstance, mediaInstance, flagsToInt(flags), timeout) == 0;
}

Expand Down

0 comments on commit fee1e56

Please sign in to comment.