mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
vf_showinfo: check return code of av_image_get_linesize()
Fixes CID703716 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0f943ed3c8
commit
2aecfd4f20
@ -52,10 +52,13 @@ static int end_frame(AVFilterLink *inlink)
|
||||
int i, plane, vsub = desc->log2_chroma_h;
|
||||
|
||||
for (plane = 0; picref->data[plane] && plane < 4; plane++) {
|
||||
size_t linesize = av_image_get_linesize(picref->format, picref->video->w, plane);
|
||||
int64_t linesize = av_image_get_linesize(picref->format, picref->video->w, plane);
|
||||
uint8_t *data = picref->data[plane];
|
||||
int h = plane == 1 || plane == 2 ? inlink->h >> vsub : inlink->h;
|
||||
|
||||
if (linesize < 0)
|
||||
return linesize;
|
||||
|
||||
for (i = 0; i < h; i++) {
|
||||
plane_checksum[plane] = av_adler32_update(plane_checksum[plane], data, linesize);
|
||||
checksum = av_adler32_update(checksum, data, linesize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user