On Mon, Dec 14, 2015 at 07:36:51PM +0100, Jean Delvare wrote: > As I understand it, the temporary stack buffer "src_data" was > introduced solely to avoid a compiler warning. I believe that a better > way to solve this warning it to explicitly cast src->data. This > should be somewhat faster, and just as safe. > > Signed-off-by: Jean Delvare <jdelv...@suse.de> > Cc: Anton Khirnov <an...@khirnov.net> > --- > libavutil/frame.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > --- ffmpeg.orig/libavutil/frame.c 2015-12-14 18:42:06.272234579 +0100 > +++ ffmpeg/libavutil/frame.c 2015-12-14 19:05:18.501745387 +0100 > @@ -647,7 +647,6 @@ AVFrameSideData *av_frame_get_side_data( > > static int frame_copy_video(AVFrame *dst, const AVFrame *src) > { > - const uint8_t *src_data[4]; > int i, planes; > > if (dst->width < src->width || > @@ -659,9 +658,8 @@ static int frame_copy_video(AVFrame *dst > if (!dst->data[i] || !src->data[i]) > return AVERROR(EINVAL); > > - memcpy(src_data, src->data, sizeof(src_data)); > av_image_copy(dst->data, dst->linesize, > - src_data, src->linesize, > + (const uint8_t **)src->data, src->linesize,
I think this may be a aliasing violation and thus undefined not that i like that or consider that sane so if someone says iam wrong, i would certainly not be unhappy [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have never wished to cater to the crowd; for what I know they do not approve, and what they approve I do not know. -- Epicurus
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel