aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2020-07-26 21:50:25 -0300
committerJames Almer <jamrial@gmail.com>2020-07-26 21:51:24 -0300
commit9faae05ddf27369838fbd500468484af31f1219c (patch)
tree412e2348e4adf8aa5069378adccd38c0a714402c /libavutil
parent5ce47d0aad31eff27a8626dd99774623f4d1b7a0 (diff)
downloadffmpeg-9faae05ddf27369838fbd500468484af31f1219c.tar.gz
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>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/imgutils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index e592f7976a..bd1333170a 100644
--- a/libavutil/imgutils.c
+++ b/libavutil/imgutils.c
@@ -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];