You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
qsvdec: Fix memory leak on error
Bug-Id: CID 1396851 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This commit is contained in:
committed by
Vittorio Giovara
parent
6a93b596c5
commit
d32bdadda8
@@ -306,8 +306,10 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q,
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
ret = get_surface(avctx, q, &insurf);
|
ret = get_surface(avctx, q, &insurf);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
av_freep(&sync);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
ret = MFXVideoDECODE_DecodeFrameAsync(q->session, avpkt->size ? &bs : NULL,
|
ret = MFXVideoDECODE_DecodeFrameAsync(q->session, avpkt->size ? &bs : NULL,
|
||||||
insurf, &outsurf, sync);
|
insurf, &outsurf, sync);
|
||||||
|
Reference in New Issue
Block a user