提交 5ce47d0a 编写于 作者: J James Almer

avutil/imgutils: don't fill data pointers for missing planes

The size for a previous plane doesn't signal the presence of another after it.
If the plane is present, av_image_fill_plane_sizes() will have returned a size
for it.

Fixes a regression since 3a8e9271.
Reported-by: NImad R. Faiad <irfaiad@gmail.com>
Signed-off-by: NJames Almer <jamrial@gmail.com>
上级 a6df1fd5
......@@ -167,7 +167,7 @@ int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int hei
memset(data , 0, sizeof(data[0])*4);
data[0] = ptr;
for (i = 1; i < 4 && sizes[i - 1] > 0; i++)
for (i = 1; i < 4 && sizes[i]; i++)
data[i] = data[i - 1] + sizes[i - 1];
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册