summaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-02-03 15:50:17 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-02-03 15:58:32 +0100
commitedc34c937b703d6eb29a3f63691aeb6637dd4aa4 (patch)
tree7e82f1e41502bea28688c019703465ce721e1b25 /libavcodec/utils.c
parent93f4b41208fb6a38ea53e06ecc5b299748ec2ffc (diff)
downloadffmpeg-streaming-edc34c937b703d6eb29a3f63691aeb6637dd4aa4.zip
ffmpeg-streaming-edc34c937b703d6eb29a3f63691aeb6637dd4aa4.tar.gz
avcodec/utils: Check the return code of av_image_fill_linesizes()
Fixes CID1271741 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index c103039..0f28fec 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -521,7 +521,9 @@ static int update_frame_pool(AVCodecContext *avctx, AVFrame *frame)
do {
// NOTE: do not align linesizes individually, this breaks e.g. assumptions
// that linesize[0] == 2*linesize[1] in the MPEG-encoder for 4:2:2
- av_image_fill_linesizes(linesize, avctx->pix_fmt, w);
+ ret = av_image_fill_linesizes(linesize, avctx->pix_fmt, w);
+ if (ret < 0)
+ return ret;
// increase alignment of w for next try (rhs gives the lowest bit set in w)
w += w & ~(w - 1);
OpenPOWER on IntegriCloud