mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-12-20 02:28:09 +00:00
Merge commit '22522d9c2c69624fe4d81d61ee65a56610f22f1d'
* commit '22522d9c2c69624fe4d81d61ee65a56610f22f1d': qsvdec: fix a memleak of async_fifo Conflicts: libavcodec/qsvdec.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
commit
c3413a712a
@ -125,10 +125,12 @@ int ff_qsv_decode_init(AVCodecContext *avctx, QSVContext *q, AVPacket *avpkt)
|
||||
HEVC which is 16 for both cases.
|
||||
So weare pre-allocating fifo big enough for 17 elements:
|
||||
*/
|
||||
q->async_fifo = av_fifo_alloc((1 + 16) *
|
||||
(sizeof(mfxSyncPoint) + sizeof(QSVFrame*)));
|
||||
if (!q->async_fifo)
|
||||
return AVERROR(ENOMEM);
|
||||
if (!q->async_fifo) {
|
||||
q->async_fifo = av_fifo_alloc((1 + 16) *
|
||||
(sizeof(mfxSyncPoint) + sizeof(QSVFrame*)));
|
||||
if (!q->async_fifo)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
q->input_fifo = av_fifo_alloc(1024*16);
|
||||
if (!q->input_fifo)
|
||||
|
Loading…
Reference in New Issue
Block a user