Browse Source

qsvdec: Fix memory leak on error

Bug-Id: CID 1396851
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
tags/n3.4
Timothy Gu Vittorio Giovara 9 years ago
parent
commit
d32bdadda8
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavcodec/qsvdec.c

+ 3
- 1
libavcodec/qsvdec.c View File

@@ -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);


Loading…
Cancel
Save