summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavcodec/qsvdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index b6fead0..b83b0fc 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -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);
OpenPOWER on IntegriCloud