summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-22 02:20:18 +0200
committerwm4 <wm4@nowhere>2013-09-22 02:20:18 +0200
commitce861c9f33fa17d2c9be64eb9e90b22a64dfd5a4 (patch)
tree0a703c499465228c9ba12fbf4b713dd3c81e88d2 /stream
parenteda596a3f9e7554a29f5e13a799934c86f800bfb (diff)
downloadmpv-ce861c9f33fa17d2c9be64eb9e90b22a64dfd5a4.tar.bz2
mpv-ce861c9f33fa17d2c9be64eb9e90b22a64dfd5a4.tar.xz
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.
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_lavf.c6
1 files changed, 6 insertions, 0 deletions
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) {