diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2010-11-22 03:46:31 +0000 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2010-11-22 03:46:31 +0000 |
commit | 8f190d8b835b009374d57ffd257a8198c83e6643 (patch) | |
tree | 7d81f2e33e667154fcb678433cde527a43879f44 /libavcodec | |
parent | d2cbdb17b57a08990ba3e9693000f60baec4dca2 (diff) | |
download | ffmpeg-8f190d8b835b009374d57ffd257a8198c83e6643.tar.gz |
fix pointer truncation to int in avpicture_layout()
Originally committed as revision 25793 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/imgconvert.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index db71ec48a3..879532d8b6 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -503,10 +503,10 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, av_image_fill_linesizes(linesizes, pix_fmt, width); for (i = 0; i < nb_planes; i++) { - int h, s = (i == 1 || i == 2) ? desc->log2_chroma_h : 0; - h = (height + (1 << s) - 1) >> s; + int h, shift = (i == 1 || i == 2) ? desc->log2_chroma_h : 0; + const unsigned char *s = src->data[i]; + h = (height + (1 << shift) - 1) >> shift; - s = src->data[i]; for (j = 0; j < h; j++) { memcpy(dest, s, linesizes[i]); dest += linesizes[i]; |