Message ID | 20161205183443.10562-1-timothygu99@gmail.com |
---|---|
State | Superseded |
Headers | show |
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index ea4abfa..258042d 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -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);