add bug fix

Signed-off-by: gao_ziyu <gaoziyu@huawei.com>
This commit is contained in:
gao_ziyu 2024-08-12 14:25:09 +08:00
parent 596d5eaaad
commit 96d373a117
3 changed files with 4 additions and 4 deletions

View File

@ -232,6 +232,7 @@ int ff_combine_frame(ParseContext *pc, int next,
}
pc->buffer = new_buffer;
memcpy(&pc->buffer[pc->index], *buf, *buf_size);
memset(&pc->buffer[pc->index + *buf_size], 0, AV_INPUT_BUFFER_PADDING_SIZE);
pc->index += *buf_size;
return -1;
}

View File

@ -871,8 +871,7 @@ static int w64_read_header(AVFormatContext *s)
uint8_t guid[16];
int ret;
avio_read(pb, guid, 16);
if (memcmp(guid, ff_w64_guid_riff, 16))
if (avio_read(pb, guid, 16) != 16 || memcmp(guid, ff_w64_guid_riff, 16))
return AVERROR_INVALIDDATA;
/* riff + wave + fmt + sizes */

View File

@ -101,9 +101,9 @@ const int *sws_getCoefficients(int colorspace)
#define PUTRGBA(dst, ysrc, asrc, i, s) \
Y = ysrc[2 * i]; \
dst[2 * i] = r[Y] + g[Y] + b[Y] + (asrc[2 * i] << s); \
dst[2 * i] = r[Y] + g[Y] + b[Y] + ((uint32_t)(asrc[2 * i]) << abase); \
Y = ysrc[2 * i + 1]; \
dst[2 * i + 1] = r[Y] + g[Y] + b[Y] + (asrc[2 * i + 1] << s);
dst[2 * i + 1] = r[Y] + g[Y] + b[Y] + ((uint32_t)(asrc[2 * i + 1]) << abase);
#define PUTRGB48(dst, src, i) \
Y = src[ 2 * i]; \