Commit d32bdadd authored by Timothy Gu's avatar Timothy Gu Committed by Vittorio Giovara

qsvdec: Fix memory leak on error

Bug-Id: CID 1396851
Signed-off-by: 's avatarVittorio Giovara <vittorio.giovara@gmail.com>
parent 6a93b596
......@@ -306,8 +306,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);
......
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