1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

qsvdec: Fix memory leak

Fixes CID1396851.
This commit is contained in:
Timothy Gu 2016-12-05 10:20:26 -08:00
parent 16a75304fe
commit b6f80b16d1

View File

@ -305,8 +305,10 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q,
do {
ret = get_surface(avctx, q, &insurf);
if (ret < 0)
if (ret < 0) {
av_freep(&sync);
return ret;
}
ret = MFXVideoDECODE_DecodeFrameAsync(q->session, avpkt->size ? &bs : NULL,
insurf, &outsurf, sync);