Changeset 1cdbccaa in ffmpeg
- Timestamp:
-
Nov 30, 2021, 4:16:32 PM
(3 years ago)
- Author:
- Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
- Branches:
- master
- Children:
- e9e2157d
- Parents:
- e22dff43
- git-author:
- Andreas Rheinhardt <andreas.rheinhardt@outlook.com> (09/25/21 10:20:20)
- git-committer:
- Andreas Rheinhardt <andreas.rheinhardt@outlook.com> (11/30/21 16:16:32)
- Message:
-
avcodec/qsvenc: Fix leak and crash when encoding H.264 due to A53_CC
Since commit 3bbe0c210b05fc6fbd7b1d4bbd8479db7f2cf957, the Payloads
array of every QSVFrame leaks as soon as the frame is reused;
the leak is small and not very noticeable, but if there is an attempt
to use said array the ensuing crash is much more noticeable.
This happens when encoding H.264 with A53 CC side data.
Furthermore, if said array can not be allocated at all, an AVFrame
leaks.
Fix all of this by not allocating the array separately at all; put it
in QSVFrame instead and restore the Payloads array upon reusing the
frame.
Finally, use av_freep() instead of av_free() to free the payload
entries.
Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
(No files)
-