People keep trying to use newer versions of ffmpeg and it is failing either to compile (in which case they just patch our code to get it to compile) or it crashes when trying to play movies. Check for two things. First, check that the version and build numbers reported in the headers match those returned by the library which should prevent any header/lib mismatch crashes. Second, check for exactly the version/build numbers that we know work are are used in both windows and OS X and worked correctly for ppc linux. If a large number of reports come in with header/lib mismatches, I'll consider removing the check for exactly the version/build numbers.
This commit is contained in:
@@ -21,26 +21,40 @@ AC_SEARCH_LIBS(guess_format, [avformat], have_libavformat=yes, have_libavformat
|
||||
fi
|
||||
|
||||
if test "$have_libavcodec" = "yes"; then
|
||||
AC_MSG_CHECKING([for libavcodec >= 0.4.9])
|
||||
AC_MSG_CHECKING([for matching libavcodec headers and libs])
|
||||
AC_TRY_RUN([
|
||||
#include <ffmpeg/avcodec.h>
|
||||
int main()
|
||||
{
|
||||
return ( LIBAVCODEC_VERSION_INT < 0x000409 )? 1:0;
|
||||
}
|
||||
],,have_libavcodec=no,)
|
||||
#include <ffmpeg/avcodec.h>
|
||||
int main()
|
||||
{
|
||||
return ( LIBAVCODEC_VERSION_INT == avcodec_version() &&
|
||||
LIBAVCODEC_BUILD == avcodec_build() ) ? 0:1;
|
||||
}
|
||||
],,have_libavcodec=no,)
|
||||
AC_MSG_RESULT($have_libavcodec)
|
||||
if test "$have_libavcodec" = "yes"; then
|
||||
AC_MSG_CHECKING([for libavcodec = 0.4.9-pre1])
|
||||
AC_TRY_RUN([
|
||||
#include <ffmpeg/avcodec.h>
|
||||
int main()
|
||||
{
|
||||
return ( LIBAVCODEC_VERSION_INT == 0x000409 &&
|
||||
LIBAVCODEC_BUILD == 4718 ) ? 0:1;
|
||||
}
|
||||
],,have_libavcodec=no,)
|
||||
AC_MSG_RESULT($have_libavcodec)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$have_libavformat" = "yes"; then
|
||||
AC_MSG_CHECKING([for libavformat >= 0.4.9])
|
||||
AC_MSG_CHECKING([for libavformat = 0.4.9-pre1])
|
||||
AC_TRY_RUN([
|
||||
#include <ffmpeg/avformat.h>
|
||||
int main()
|
||||
{
|
||||
return ( LIBAVFORMAT_VERSION_INT < 0x000409 )? 1:0;
|
||||
}
|
||||
],,have_libavformat=no,)
|
||||
#include <ffmpeg/avformat.h>
|
||||
int main()
|
||||
{
|
||||
return ( LIBAVFORMAT_VERSION_INT == 0x000409 &&
|
||||
LIBAVFORMAT_BUILD == 4616 )? 0:1;
|
||||
}
|
||||
],,have_libavformat=no,)
|
||||
AC_MSG_RESULT($have_libavformat)
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user