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; }