diff -rupN ffDiaporama-old/src/ffDiaporama/engine/cDeviceModelDef.h ffDiaporama-new/src/ffDiaporama/engine/cDeviceModelDef.h --- ffDiaporama-old/src/ffDiaporama/engine/cDeviceModelDef.h 2014-04-12 00:41:33.000000000 -0400 +++ ffDiaporama-new/src/ffDiaporama/engine/cDeviceModelDef.h 2015-03-08 11:52:16.000000000 -0400 @@ -84,11 +84,16 @@ extern "C" { #elif (LIBAVUTIL_VERSION_MICRO>=100)&&(LIBAVCODEC_VERSION_MICRO>=100)&&(LIBAVFORMAT_VERSION_MICRO>=100)&&(LIBAVDEVICE_VERSION_MICRO>=100)&&(LIBAVFILTER_VERSION_MICRO>=100)&&(LIBSWSCALE_VERSION_MICRO>=100) #define FFMPEG #include "libswresample/swresample.h" - #define RESAMPLE_MAX_CHANNELS SWR_CH_MAX #include "libavfilter/avcodec.h" #include "libavfilter/buffersink.h" #include "libavfilter/buffersrc.h" - #if ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(52,66,100))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(55,52,102))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(55,33,100))&& \ + #if ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(54,15,100))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(56,13,100))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(56,15,102))&& \ + (LIBAVDEVICE_VERSION_INT>=AV_VERSION_INT(56,3,100))&&(LIBAVFILTER_VERSION_INT>=AV_VERSION_INT(5,2,103))&&(LIBSWSCALE_VERSION_INT>=AV_VERSION_INT(3,1,101))&& \ + (LIBSWRESAMPLE_VERSION_INT>=AV_VERSION_INT(1,1,100))) + #define FFMPEGVERSIONINT 250 + #define FFMPEGVERSION "FFmpeg 2.5 or higher" + #define RESAMPLE_MAX_CHANNELS 32 + #elif ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(52,66,100))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(55,52,102))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(55,33,100))&& \ (LIBAVDEVICE_VERSION_INT>=AV_VERSION_INT(55,10,100))&&(LIBAVFILTER_VERSION_INT>=AV_VERSION_INT(4,2,100))&&(LIBSWSCALE_VERSION_INT>=AV_VERSION_INT(2,5,102))&& \ (LIBSWRESAMPLE_VERSION_INT>=AV_VERSION_INT(0,18,100))) #define FFMPEGVERSIONINT 220 @@ -108,6 +113,13 @@ extern "C" { #else // unsupported version #endif + + #if (FFMPEGVERSIONINT >=250) + #define RESAMPLE_MAX_CHANNELS 32 + #else + #define RESAMPLE_MAX_CHANNELS SWR_CH_MAX + #endif + #endif } diff -rupN ffDiaporama-old/src/ffDiaporama/engine/_EncodeVideo.cpp ffDiaporama-new/src/ffDiaporama/engine/_EncodeVideo.cpp --- ffDiaporama-old/src/ffDiaporama/engine/_EncodeVideo.cpp 2014-06-23 03:39:23.000000000 -0400 +++ ffDiaporama-new/src/ffDiaporama/engine/_EncodeVideo.cpp 2015-03-08 11:52:16.000000000 -0400 @@ -416,6 +416,9 @@ bool cEncodeVideo::OpenVideoStream(sVide VideoStream->codec->height =ImageHeight; VideoStream->codec->pix_fmt =PIX_FMT_YUV420P; VideoStream->codec->time_base =VideoFrameRate; + #if FFMPEGVERSIONINT>=250 + VideoStream->time_base = VideoFrameRate; //new ffmpeg 2.5.0!!!! + #endif VideoStream->codec->sample_aspect_ratio =PixelAspectRatio; VideoStream->sample_aspect_ratio =PixelAspectRatio; VideoStream->codec->gop_size =12;