OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2cbdb1
)
fix pointer truncation to int in avpicture_layout()
author
Ramiro Polla
<ramiro.polla@gmail.com>
Mon, 22 Nov 2010 03:46:31 +0000
(
03:46
+0000)
committer
Ramiro Polla
<ramiro.polla@gmail.com>
Mon, 22 Nov 2010 03:46:31 +0000
(
03:46
+0000)
Originally committed as revision 25793 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/imgconvert.c
patch
|
blob
|
history
diff --git
a/libavcodec/imgconvert.c
b/libavcodec/imgconvert.c
index
db71ec4
..
879532d
100644
(file)
--- 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];