From a1093099c80b3fbd833713dacbee48365091f319 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 27 Jun 2010 12:17:19 +0000 Subject: [PATCH] (untested) fix for ffmpeg versions 52.68.0 and above --- panda/src/movies/ffmpegVirtualFile.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/panda/src/movies/ffmpegVirtualFile.cxx b/panda/src/movies/ffmpegVirtualFile.cxx index 4eba926f22..7e3d452797 100644 --- a/panda/src/movies/ffmpegVirtualFile.cxx +++ b/panda/src/movies/ffmpegVirtualFile.cxx @@ -32,7 +32,12 @@ extern "C" { extern "C" { static int pandavfs_open(URLContext *h, const char *filename, int flags); static int pandavfs_read(URLContext *h, unsigned char *buf, int size); +// This change happened a few days before 52.68.0 +#if LIBAVFORMAT_VERSION_INT < 3425280 + static int pandavfs_write(URLContext *h, const unsigned char *buf, int size); +#else static int pandavfs_write(URLContext *h, unsigned char *buf, int size); +#endif static PN_int64 pandavfs_seek(URLContext *h, PN_int64 pos, int whence); static int pandavfs_close(URLContext *h); } @@ -88,7 +93,11 @@ pandavfs_read(URLContext *h, unsigned char *buf, int size) { // Description: A hook to write a panda VFS file. //////////////////////////////////////////////////////////////////// static int +#if LIBAVFORMAT_VERSION_INT < 3425280 pandavfs_write(URLContext *h, unsigned char *buf, int size) { +#else +pandavfs_write(URLContext *h, const unsigned char *buf, int size) { +#endif movies_cat.error() << "ffmpeg is trying to write to the VFS.\n"; return -1; }