You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
qsvdec: fix a memleak of async_fifo
init() is called whenever format changes, so current code would leak the fifo in this case.
This commit is contained in:
@ -73,10 +73,12 @@ int ff_qsv_decode_init(AVCodecContext *avctx, QSVContext *q, mfxSession session)
|
|||||||
mfxVideoParam param = { { 0 } };
|
mfxVideoParam param = { { 0 } };
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
q->async_fifo = av_fifo_alloc((1 + q->async_depth) *
|
if (!q->async_fifo) {
|
||||||
(sizeof(mfxSyncPoint) + sizeof(QSVFrame*)));
|
q->async_fifo = av_fifo_alloc((1 + q->async_depth) *
|
||||||
if (!q->async_fifo)
|
(sizeof(mfxSyncPoint) + sizeof(QSVFrame*)));
|
||||||
return AVERROR(ENOMEM);
|
if (!q->async_fifo)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
|
|
||||||
ret = qsv_init_session(avctx, q, session);
|
ret = qsv_init_session(avctx, q, session);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
Reference in New Issue
Block a user