more platform-independent fix for URLRageFile_write prototype

This commit is contained in:
Mark Cannon
2012-01-09 05:12:20 -08:00
parent 6c88fb9cc8
commit 6256b05272
@@ -681,16 +681,19 @@ int URLRageFile_read( avcodec::URLContext *h, unsigned char *buf, int size )
return f->Read( buf, size );
}
#if defined(MACOSX) || defined(_MSC_VER) // still using older ffmpeg versions
int URLRageFile_write( avcodec::URLContext *h, unsigned char *buf, int size )
#else // assume ffmpeg 0.6 on *nix
int URLRageFile_write( avcodec::URLContext *h, const unsigned char *buf, int size )
#endif
int URLRageFile_write( avcodec::URLContext *h, const unsigned char *buf, int size )
{
RageFileBasic *f = (RageFileBasic *) h->priv_data;
return f->Write( buf, size );
}
/* Some avcodecs want unsigned char, others want const. Make everyone happy
* by providing a const overload and letting the compiler figure it out. */
int URLRageFile_write( avcodec::URLContext *h, unsigned char *buf, int size )
{
return URLRageFile_write( h, (const unsigned char*)buf, size );
}
// sm4svn has it as:
#if defined(MACOSX)
avcodec::offset_t URLRageFile_seek( avcodec::URLContext *h, avcodec::offset_t pos, int whence )