diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-17 10:07:09 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-18 16:15:10 +0100 |
commit | 6d96c7ea89600655b1f18a3b12f3f041fa714152 (patch) | |
tree | b1d83b86b25fec60a307d23658410d5a5e5bbac4 | |
parent | f401792595dd7760f531e8a3bd2336e9033bd45a (diff) | |
download | ffmpeg-6d96c7ea89600655b1f18a3b12f3f041fa714152.tar.gz |
vf_showinfo: Forward the av_image_get_linesize error
CC: libav-stable@libav.org
Bug-Id: CID 1087086
-rw-r--r-- | libavfilter/vf_showinfo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index cc9ec1c1d0..ede1765d1e 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -78,9 +78,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) int i, plane, vsub = desc->log2_chroma_h; 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]; 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++) { plane_checksum[plane] = av_adler32_update(plane_checksum[plane], data, linesize); |