Commit 55d830f6 authored by Peter Ross's avatar Peter Ross

avcodec/pngdec: set return value on av_stereo3d_create_side_data() failure

Signed-off-by: 's avatarPeter Ross <pross@xvid.org>
Reviewed-by: 's avatarVittorio Giovara <vittorio.giovara@gmail.com>
parent 1d15e420
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment