From ce861c9f33fa17d2c9be64eb9e90b22a64dfd5a4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 22 Sep 2013 02:20:18 +0200 Subject: 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. --- stream/stream_lavf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c index 9a25d7524a..545a8dfc5c 100644 --- a/stream/stream_lavf.c +++ b/stream/stream_lavf.c @@ -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) { -- cgit v1.2.3