Commit b6f80b16 authored by Timothy Gu's avatar Timothy Gu

qsvdec: Fix memory leak

Fixes CID1396851.
parent 16a75304
......@@ -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);
......
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