mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 07:20:45 +00:00
avcodec/qsvenc: Properly flush the FIFO on close
Freeing the new H.264 specific fields has been forgotten. (This leak only appears in case the encoder has not been completely drained.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
e9e2157dda
commit
d47a986b79
@ -1626,6 +1626,14 @@ int ff_qsv_enc_close(AVCodecContext *avctx, QSVEncContext *q)
|
||||
av_fifo_generic_read(q->async_fifo, &sync, sizeof(sync), NULL);
|
||||
av_fifo_generic_read(q->async_fifo, &bs, sizeof(bs), NULL);
|
||||
|
||||
#if QSV_VERSION_ATLEAST(1, 26)
|
||||
if (avctx->codec_id == AV_CODEC_ID_H264) {
|
||||
mfxExtBuffer **enc_buf = bs->ExtParam;
|
||||
mfxExtAVCEncodedFrameInfo *enc_info = (mfxExtAVCEncodedFrameInfo *)(*bs->ExtParam);
|
||||
av_freep(&enc_info);
|
||||
av_freep(&enc_buf);
|
||||
}
|
||||
#endif
|
||||
av_freep(&sync);
|
||||
av_freep(&bs);
|
||||
av_packet_unref(&pkt);
|
||||
|
Loading…
Reference in New Issue
Block a user