[Ffmpeg-devel] [PATCH] avoid useless memcpy with src==dst (valgrind complains)
Sun Jul 23 11:10:50 CEST 2006
On Sun, Jul 23, 2006 at 09:50:50AM +0100, M?ns Rullg?rd wrote:
> Reimar D?ffinger said:
> > On Sun, Jul 09, 2006 at 12:05:16AM +0200, Reimar D?ffinger wrote:
> >> maybe this is cosmetics (not sure of the speed effects, but I doubt the
> >> matter here), but I prefer to have less warnings with valgrind (this is
> >> a memcpy here since buf and last point to structs).
> Simple assignment can be faster than memcpy and is clearer.
Huh? The problem is the assignment is obviously replaced by a memcpy by the
compiler, which in case both point to the same place makes valgrind
complain (since src and dst are overlapping).
More information about the ffmpeg-devel