[FFmpeg-devel] [PATCH] cmdutils: Do not unconditionally define functions using avdevice's API

Derek Buitenhuis derek.buitenhuis at gmail.com
Thu Feb 8 17:21:43 EET 2018


avdevice is not a hard requiremnet for any of the fftools, and this was
broken in cdc78058c78dfa4966758a342acd2c1f3b282c46.

Fixes build with --disable-avdevice.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
---
I see you guys can't decide on whether to revert or not, but in
the meantime, there is a fix for build breakage. Please don't
reply with something like "we can't push until we finish
bikeshedding over reverting or not".

Quite a lot of people build without avdevice.
---
 fftools/cmdutils.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 0b06ccc..4f482d6 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -1281,9 +1281,11 @@ static int show_formats_devices(void *optctx, const char *opt, const char *arg,
         } } while(0)
 
         x(av_muxer_iterate, ofmt, muxdemuxers != SHOW_DEMUXERS && !device_only);
-        x(av_outdev_iterate, ofmt, muxdemuxers != SHOW_DEMUXERS);
         x(av_demuxer_iterate, ifmt, muxdemuxers != SHOW_MUXERS && !device_only);
+#if CONFIG_AVDEVICE
+        x(av_outdev_iterate, ofmt, muxdemuxers != SHOW_DEMUXERS);
         x(av_indev_iterate, ifmt, muxdemuxers != SHOW_MUXERS);
+#endif
 #undef x
         if (!name)
             break;
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list