diff options
author | Peter Ross <pross@xvid.org> | 2020-04-17 15:35:43 +0300 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2020-04-18 03:16:55 +0300 |
commit | 55d830f69a2ff3ca191d97862200d4cc480d25b7 (patch) | |
tree | 73cc8042ef0c6c65ff7cf4a6818f0137d760c0c1 /libavcodec/pngdec.c | |
parent | 1d15e4208f78b2b92b01992686dd47fc4159278d (diff) |
avcodec/pngdec: set return value on av_stereo3d_create_side_data() failure
Signed-off-by: Peter Ross <pross@xvid.org>
Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r-- | libavcodec/pngdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 7e2c19bd57..12d4eb0610 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -1286,8 +1286,10 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, case MKTAG('s', 'T', 'E', 'R'): { int mode = bytestream2_get_byte(&s->gb); AVStereo3D *stereo3d = av_stereo3d_create_side_data(p); - if (!stereo3d) + if (!stereo3d) { + ret = AVERROR(ENOMEM); goto fail; + } if (mode == 0 || mode == 1) { stereo3d->type = AV_STEREO3D_SIDEBYSIDE; |