Description: Make the sources building with new FFmpeg. --- src/codecs.c | 4 ++-- src/main.c | 5 +---- src/xtoffmpeg.c | 15 +++++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) --- xvidcap-1.1.7.orig/src/xtoffmpeg.c +++ xvidcap-1.1.7/src/xtoffmpeg.c @@ -56,13 +56,12 @@ #include "xvidcap-intl.h" // ffmpeg stuff -#include -#include -#include +#include +#include +#include //#include -#include -#include -#include +#include +#include #define swscale_isRGB(x) ((x)==PIX_FMT_BGR32 || (x)==PIX_FMT_RGB24 \ || (x)==PIX_FMT_RGB565 || (x)==PIX_FMT_RGB555 \ || (x)==PIX_FMT_RGB8 || (x)==PIX_FMT_RGB4 \ @@ -1248,7 +1247,11 @@ add_video_stream (AVFormatContext * oc, st->codec->flags |= CODEC_FLAG2_FAST; // there is no trellis quantiser in libav* for mjpeg if (st->codec->codec_id != CODEC_ID_MJPEG) +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) st->codec->flags |= CODEC_FLAG_TRELLIS_QUANT; +#else + st->codec->trellis = 1; +#endif st->codec->flags &= ~CODEC_FLAG_OBMC; // some formats want stream headers to be seperate if (oc->oformat->flags & AVFMT_GLOBALHEADER) --- xvidcap-1.1.7.orig/src/codecs.c +++ xvidcap-1.1.7/src/codecs.c @@ -43,8 +43,8 @@ #include #ifdef USE_FFMPEG -#include -#include +#include +#include #endif // USE_FFMPEG #include "app_data.h" --- xvidcap-1.1.7.orig/src/main.c +++ xvidcap-1.1.7/src/main.c @@ -45,7 +45,7 @@ #include #ifdef USE_FFMPEG -#include +#include #endif // USE_FFMPEG #include "control.h" @@ -217,9 +217,6 @@ cleanup () if (app) xvc_appdata_free (app); -#ifdef USE_FFMPEG - av_free_static (); -#endif } /**