core: fix assert in libvlc_MetadataRequest()

It is now possible to use the preparser only for parsing, only for
fetching or both.

Fixes #28545
This commit is contained in:
Thomas Guillem 2024-02-28 06:57:37 +01:00
parent d72ecb37c6
commit 39a6ab3d7c
1 changed files with 2 additions and 1 deletions

View File

@ -481,7 +481,8 @@ int libvlc_MetadataRequest(libvlc_int_t *libvlc, input_item_t *item,
int timeout, void *id)
{
libvlc_priv_t *priv = libvlc_priv(libvlc);
assert(i_options & META_REQUEST_OPTION_SCOPE_ANY);
assert(i_options & META_REQUEST_OPTION_SCOPE_ANY ||
i_options & META_REQUEST_OPTION_FETCH_ANY);
if (unlikely(priv->parser == NULL))
return VLC_ENOMEM;