diff options
author | Jun Zhao <barryjzhao@tencent.com> | 2019-04-04 23:47:46 +0800 |
---|---|---|
committer | Jun Zhao <barryjzhao@tencent.com> | 2019-04-09 09:16:07 +0800 |
commit | 0a347ff4222345c88b93d7962a696f0e9aae7ca2 (patch) | |
tree | ae7ceee81c40f37f5ef17a132e930fd03b81095e /libavutil | |
parent | bb5efd1727eeecc9be8f1402810c7ab72344eed3 (diff) | |
download | ffmpeg-0a347ff4222345c88b93d7962a696f0e9aae7ca2.tar.gz |
lavf/matroskaenc: Fix memory leak after write trailer
Fix memory leak after write trailer for #7827, only store a audio
packet whose buffer has size greater than zero in cur_audio_pkt.
Audio packets with size zero, but with side-data currently lead to
memleaks, in the Matroska muxer, because they are not properly freed:
They are currently put into an AVPacket in the MatroskaMuxContext to
ensure that the necessary audio is always available for a new cluster,
but are only written and freed when their size is > 0.
As the only use we have for such packets consists in updating the
CodecPrivate it makes no sense to store these packets at all and this
is how this commit solves the memleak.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Diffstat (limited to 'libavutil')
0 files changed, 0 insertions, 0 deletions