(untested) fix for ffmpeg versions 52.68.0 and above

This commit is contained in:
rdb 2010-06-27 12:17:19 +00:00
parent a153f2ff7f
commit a1093099c8
1 changed files with 9 additions and 0 deletions

View File

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