[FFmpeg-devel] [PATCH]Avoid non-strict pointer aliasing in kega decoder
Carl Eugen Hoyos
cehoyos at ag.or.at
Mon Mar 4 09:49:36 CET 2013
Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> writes:
> >With my current patch, the for loop looks like this:
> > for (i = inp_off; i < count + inp_off; i++) {
> > memcpy(&out[2 * outcnt++], &inp[2 * i], 2);
> > }
> >
> >When I change that to memcpy:
> > memcpy(&out[2 * outcnt], &inp[2 * inp_off], 2 * count);
> > outcnt += count;
> >
> >I see ugly artefacts.
>
> Maybe inp and out can overlap? Try memmove.
They often overlap and memmove would change
the functionality.
Is the last patch ok or are there still changes
needed?
Thank you, Carl Eugen
More information about the ffmpeg-devel
mailing list