summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-08 01:04:37 +0100
committerwm4 <wm4@nowhere>2014-02-08 01:04:37 +0100
commit8eaf6c42ac9df1a3e5ef7385887b708d7cfbac28 (patch)
tree3b429fd596a625553de5a86f24021c2086365a0c /demux
parent17ec073a1588ddf768e64775ee51c0c47f94bfc2 (diff)
downloadmpv-8eaf6c42ac9df1a3e5ef7385887b708d7cfbac28.tar.bz2
mpv-8eaf6c42ac9df1a3e5ef7385887b708d7cfbac28.tar.xz
demux_lavf: work around idiotic libavutil API printing a warning
Trying to set a non-existent flag (like +keepside on Libav) causes libavutil print an incomprehensible warning (something about eval; probably the overengineered libavutil option parser tripping over the '+' normally used for flags, and trying to interpret it as formula). There's apparently no easy way to check for the existence of a flag, so add some more ifdeffery to shut it up.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_lavf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index ad183629ff..e3ac84b50d 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -560,9 +560,13 @@ static int demux_open_lavf(demuxer_t *demuxer, enum demux_check check)
avfc->flags |= AVFMT_FLAG_GENPTS;
if (opts->index_mode == 0)
avfc->flags |= AVFMT_FLAG_IGNIDX;
+
+#if LIBAVFORMAT_VERSION_MICRO >= 100
/* Keep side data as side data instead of mashing it into the packet
- * stream. */
+ * stream.
+ * Note: Libav doesn't have this horrible insanity. */
av_opt_set(avfc, "fflags", "+keepside", 0);
+#endif
if (lavfdopts->probesize) {
if (av_opt_set_int(avfc, "probesize", lavfdopts->probesize, 0) < 0)