Commit 8c140b9e authored by Antoine Cellerier's avatar Antoine Cellerier

Fix ffmpeg section flag handling calls. (at least it fixes the pkg-config code path)

parent ebd3b8f3
......@@ -3033,18 +3033,19 @@ dnl Trying with pkg-config
[${FFMPEG_LIBS}])
],
[${SWSCALE_LIBS}])
VLC_RESTORE_FLAGS
],[AC_CHECK_LIB(avcodec,img_resample,[],
[AC_MSG_ERROR([Your FFmpeg library doesn't have the needed img_resample() function. You should rebuild it with software scaler disabled, or install the swscale headers.])],
[${FFMPEG_LIBS}])
]
)
VLC_RESTORE_FLAGS
],[
dnl
dnl last chance: at the default place
dnl
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg} ${LIBS_ffmpeg}"
AC_CHECK_HEADERS(ffmpeg/avcodec.h libavcodec/avcodec.h)
......@@ -3071,8 +3072,7 @@ dnl Trying with pkg-config
AC_CHECK_LIB(avformat, av_open_input_stream, [
VLC_ADD_LIBS([ffmpeg],[-lavformat -lz]) ], [], [-lavcodec -lz $LDAVUTIL])
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
VLC_RESTORE_FLAGS
AC_CHECK_LIB(swscale, sws_getContext, [
AC_CHECK_HEADERS(ffmpeg/swscale.h libswscale/swscale.h)
......@@ -3080,10 +3080,10 @@ dnl Trying with pkg-config
[AC_CHECK_LIB(avcodec,img_resample,[],
[AC_MSG_ERROR([Your FFmpeg library doesn't have the needed img_resample() function. You should rebuild it with software scaler disabled, or install the swscale headers.])],
[-lavcodec $LDAVUTIL])
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
],
[${SWSCALE_LIBS}])
VLC_RESTORE_FLAGS
])
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment