mirror of https://git.ffmpeg.org/ffmpeg.git
vf_showinfo: Forward the av_image_get_linesize error
CC: libav-stable@libav.org Bug-Id: CID 1087086
This commit is contained in:
parent
608e8d8dd7
commit
2496dbd68b
|
@ -78,9 +78,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
|
||||||
int i, plane, vsub = desc->log2_chroma_h;
|
int i, plane, vsub = desc->log2_chroma_h;
|
||||||
|
|
||||||
for (plane = 0; frame->data[plane] && plane < 4; plane++) {
|
for (plane = 0; frame->data[plane] && plane < 4; plane++) {
|
||||||
size_t linesize = av_image_get_linesize(frame->format, frame->width, plane);
|
|
||||||
uint8_t *data = frame->data[plane];
|
uint8_t *data = frame->data[plane];
|
||||||
int h = plane == 1 || plane == 2 ? inlink->h >> vsub : inlink->h;
|
int h = plane == 1 || plane == 2 ? inlink->h >> vsub : inlink->h;
|
||||||
|
int linesize = av_image_get_linesize(frame->format, frame->width, plane);
|
||||||
|
if (linesize < 0)
|
||||||
|
return linesize;
|
||||||
|
|
||||||
for (i = 0; i < h; i++) {
|
for (i = 0; i < h; i++) {
|
||||||
plane_checksum[plane] = av_adler32_update(plane_checksum[plane], data, linesize);
|
plane_checksum[plane] = av_adler32_update(plane_checksum[plane], data, linesize);
|
||||||
|
|
Loading…
Reference in New Issue