mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 22:28:22 +01:00
VP8LEncodeStream: add an assert
check enc->argb_ to quiet an msvs /analyze warning: C6387: 'enc->argb_+y*width' could be '0': this does not adhere to the specification for the function 'memcpy'. Change-Id: I87544e92ee0d3ea38942a475c30c6d552f9877b7
This commit is contained in:
parent
c5f7747fc5
commit
f0e0677b87
@ -1257,6 +1257,7 @@ WebPEncodingError VP8LEncodeStream(const WebPConfig* const config,
|
|||||||
int y;
|
int y;
|
||||||
err = AllocateTransformBuffer(enc, width, height);
|
err = AllocateTransformBuffer(enc, width, height);
|
||||||
if (err != VP8_ENC_OK) goto Error;
|
if (err != VP8_ENC_OK) goto Error;
|
||||||
|
assert(enc->argb_ != NULL);
|
||||||
for (y = 0; y < height; ++y) {
|
for (y = 0; y < height; ++y) {
|
||||||
memcpy(enc->argb_ + y * width,
|
memcpy(enc->argb_ + y * width,
|
||||||
picture->argb + y * picture->argb_stride,
|
picture->argb + y * picture->argb_stride,
|
||||||
|
Loading…
Reference in New Issue
Block a user