From: <kla...@us...> - 2008-11-27 02:19:00
|
Revision: 12497 http://vegastrike.svn.sourceforge.net/vegastrike/?rev=12497&view=rev Author: klaussfreire Date: 2008-11-27 02:18:55 +0000 (Thu, 27 Nov 2008) Log Message: ----------- ffmpeg >51 compatibility Modified Paths: -------------- trunk/vegastrike/src/audio/codecs/FFStream.cpp trunk/vegastrike/src/ffmpeg_init.cpp trunk/vegastrike/src/gfx/vid_file.cpp Modified: trunk/vegastrike/src/audio/codecs/FFStream.cpp =================================================================== --- trunk/vegastrike/src/audio/codecs/FFStream.cpp 2008-11-18 18:31:54 UTC (rev 12496) +++ trunk/vegastrike/src/audio/codecs/FFStream.cpp 2008-11-27 02:18:55 UTC (rev 12497) @@ -127,12 +127,16 @@ case SAMPLE_FMT_S16: fmt.bitsPerSample = 16; fmt.signedSamples = 1; break; + #ifdef SAMPLE_FMT_S24 case SAMPLE_FMT_S24: fmt.bitsPerSample = 24; fmt.signedSamples = 1; break; + #endif + #ifdef SAMPLE_FMT_S32 case SAMPLE_FMT_S32: fmt.bitsPerSample = 32; fmt.signedSamples = 1; break; + #endif default: throw CodecNotFoundException(errbase + " (unsupported audio format)"); } sampleSize = (fmt.bitsPerSample + 7) / 8 * fmt.channels; Modified: trunk/vegastrike/src/ffmpeg_init.cpp =================================================================== --- trunk/vegastrike/src/ffmpeg_init.cpp 2008-11-18 18:31:54 UTC (rev 12496) +++ trunk/vegastrike/src/ffmpeg_init.cpp 2008-11-27 02:18:55 UTC (rev 12497) @@ -38,6 +38,14 @@ /* ******************************************** */ #ifdef HAVE_FFMPEG +#ifndef offset_t + #if LIBAVCODEC_VERSION_MAJOR >= 52 + typedef int64_t offset_t; + #else + typedef int offset_t; + #endif +#endif + using namespace VSFileSystem; extern "C" int _url_open(URLContext *h, const char *filename, int flags) Modified: trunk/vegastrike/src/gfx/vid_file.cpp =================================================================== --- trunk/vegastrike/src/gfx/vid_file.cpp 2008-11-18 18:31:54 UTC (rev 12496) +++ trunk/vegastrike/src/gfx/vid_file.cpp 2008-11-27 02:18:55 UTC (rev 12497) @@ -36,12 +36,21 @@ #endif #include "ffmpeg_init.h" +#include <sys/types.h> /* FOLLOWING CODE IS ONLY INCLUDED IF YOU HAVE FFMPEG */ /* ******************************************** */ #ifdef HAVE_FFMPEG +#ifndef offset_t + #if LIBAVCODEC_VERSION_MAJOR >= 52 + typedef int64_t offset_t; + #else + typedef int offset_t; + #endif +#endif + using namespace VSFileSystem; class VideoFileImpl { |