From 9d33c8fefbb506377b943aba11cd99c74258c5de Mon Sep 17 00:00:00 2001 From: Anton Mitrofanov Date: Tue, 31 Jul 2018 22:54:33 +0300 Subject: [PATCH] configure: Fix required version checks for lavf and swscale --- configure | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 3b8d8145..3063cd79 100755 --- a/configure +++ b/configure @@ -1102,10 +1102,10 @@ if [ "$swscale" = "auto" ] ; then [ -z "$SWSCALE_LIBS" ] && SWSCALE_LIBS="-lswscale -lavutil" if cc_check "libswscale/swscale.h" "$SWSCALE_CFLAGS $SWSCALE_LIBS" "sws_init_context(0,0,0);" ; then - if cpp_check "libavutil/pixdesc.h" "$SWSCALE_CFLAGS $SWSCALE_LIBS" "defined(AV_PIX_FMT_FLAG_RGB)" ; then + if cc_check "libavutil/pixdesc.h" "$SWSCALE_CFLAGS $SWSCALE_LIBS" "AVComponentDescriptor x; x.depth = 8;" ; then swscale="yes" else - echo "Warning: AV_PIX_FMT_FLAG_RGB is missing from libavutil, update for swscale support" + echo "Warning: libswscale is too old" fi fi fi @@ -1124,12 +1124,16 @@ if [ "$lavf" = "auto" ] ; then fi if cc_check libavformat/avformat.h "$LAVF_CFLAGS $LAVF_LIBS" "av_register_all();" ; then - if [ "$swscale" = "yes" ]; then + if cc_check libavcodec/avcodec.h "$LAVF_CFLAGS $LAVF_LIBS" "avcodec_send_packet(0,0);" ; then lavf="yes" else - echo "Warning: libavformat is not supported without swscale support" + echo "Warning: libavformat is too old" fi fi + if [ "$lavf" = "yes" -a "$swscale" = "no" ]; then + echo "Warning: libavformat is not supported without swscale support" + lavf="no" + fi fi if [ "$ffms" = "auto" ] ; then -- 2.40.0