mirror of https://git.ffmpeg.org/ffmpeg.git
avutil/imgutils: always zero data pointers in av_image_fill_pointers()
This restores the relevant behavior of the function as it was before
3a8e927176
.
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
5ce47d0aad
commit
9faae05ddf
|
@ -150,6 +150,8 @@ int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int hei
|
|||
ptrdiff_t linesizes1[4];
|
||||
size_t sizes[4];
|
||||
|
||||
memset(data , 0, sizeof(data[0])*4);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
linesizes1[i] = linesizes[i];
|
||||
|
||||
|
@ -164,8 +166,6 @@ int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int hei
|
|||
ret += sizes[i];
|
||||
}
|
||||
|
||||
memset(data , 0, sizeof(data[0])*4);
|
||||
|
||||
data[0] = ptr;
|
||||
for (i = 1; i < 4 && sizes[i]; i++)
|
||||
data[i] = data[i - 1] + sizes[i - 1];
|
||||
|
|
Loading…
Reference in New Issue