decode: avoid leaks on failure in ff_get_buffer()

If the get_buffer() call fails, the frame might have some side data
already set. Make sure it gets freed.

CC: libav-stable@libav.org
This commit is contained in:
Anton Khirnov 2017-07-01 11:32:56 +02:00
parent 70946e6059
commit de77671438

View File

@ -1069,6 +1069,9 @@ end:
frame->height = avctx->height;
}
if (ret < 0)
av_frame_unref(frame);
return ret;
}