[FFmpeg-devel] Patch: avoid "void * " in pointer calculate
Thu Feb 14 02:51:48 CET 2008
On Wed, Feb 13, 2008 at 06:55:33PM +0000, M?ns Rullg?rd wrote:
> Rich Felker <dalias at aerifal.cx> writes:
> > On Wed, Feb 13, 2008 at 09:29:46PM +0800, mvplayer wrote:
> >> /* let's disallow possible ambiguous cases */
> >> @@ -105,9 +106,9 @@
> >> //FIXME this isn't aligned correctly, though it probably isn't needed
> >> if(!ptr) return av_malloc(size);
> >> diff= ((char*)ptr)[-1];
> >> - return realloc(ptr - diff, size + diff) + diff;
> >> + return (char*)realloc(ptr - diff, size + diff) + diff;
> > This is absolute nonsense. C is not C++.
> You're overlooking the +diff at the end of the line.
Indeed, I stand corrected.
More information about the ffmpeg-devel