Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
demux_lavf: fix demuxer-lavf-format usage
mpv internally treats all string options/properties with NULL or an empty string the same way. client.h explicitly forbids MPV_FORMAT_STRING from being NULL, but in the C API, it has been working accidentally due to how strings are copied. Nevertheless, none of the APIs allow this; JavaScript, Lua, IPC, and CLI all require strings to be at least empty. We cannot pass NULL. Furthermore, currently passing NULL causes an assertion failure in the JSON formatter, so it is clearly not intended to be used that way. Internally, all string options default to NULL, but in this case, they should behave exactly the same as an empty string. Hence, this change is applied to the `demuxer-lavf-format` option. Note that get_property will never return a NULL value, regardless of the internal value. Fixes: #15840
- Loading branch information