mirror of
https://github.com/mpv-player/mpv
synced 2025-01-24 08:33:34 +00:00
stream_lavf: print lavf options that could not be set
Mainly for debugging. Usually, we just set options for all possible protocols, and we can't really know whether a certain protocol is used beforehand. That's also the reason why avio_open2() takes a dictionary, instead of letting the user set options directly with av_opt_set(). Or in other words, we don't know whether an option that could be set is an error or not, thus we print the messages only at verbose level.
This commit is contained in:
parent
eda596a3f9
commit
ce861c9f33
@ -202,6 +202,12 @@ static int open_f(stream_t *stream, int mode)
|
||||
goto out;
|
||||
}
|
||||
|
||||
AVDictionaryEntry *t = NULL;
|
||||
while ((t = av_dict_get(dict, "", t, AV_DICT_IGNORE_SUFFIX))) {
|
||||
mp_msg(MSGT_OPEN, MSGL_V, "[ffmpeg] Could not set stream option %s=%s\n",
|
||||
t->key, t->value);
|
||||
}
|
||||
|
||||
if (mp_avio_has_opts(avio)) {
|
||||
uint8_t *mt = NULL;
|
||||
if (av_opt_get(avio, "mime_type", AV_OPT_SEARCH_CHILDREN, &mt) >= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user