summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2019-08-26 11:54:13 -0700
committerJohn Stebbins <[email protected]>2019-08-26 11:55:52 -0700
commitffd4524c845ee4572568e80a30fda6bd583c88f4 (patch)
tree438631576047566be0d4fe26cff7c5e2cd6019c8
parent8577dcd6f47d253323ebdc5da804a498350bf924 (diff)
fix initialization of libswscale stride data
swscale looks at all 4 elements even when the format has less than 4 planes. Initialize all to previent spurious warning messages.
-rw-r--r--libhb/hb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libhb/hb.c b/libhb/hb.c
index 0b0aa401c..407c2554d 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -118,6 +118,8 @@ int hb_picture_fill(uint8_t *data[], int stride[], hb_buffer_t *buf)
for (ii = 0; ii <= buf->f.max_plane; ii++)
stride[ii] = buf->plane[ii].stride;
+ for (; ii < 4; ii++)
+ stride[ii] = stride[ii - 1];
ret = av_image_fill_pointers(data, buf->f.fmt,
buf->plane[0].height_stride,