diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-03-27 08:31:29 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-05-20 02:54:39 +0200 |
commit | 710ad43919ad1259978823ff4b7d2f3206f6a116 (patch) | |
tree | a104f2f9268e3581d8811dbbb82ab64ec4e22137 /doc/examples/avio_dir_cmd.c | |
parent | 15f051e09a53a8ab79c334b907b842ebdffd816d (diff) | |
download | ffmpeg-710ad43919ad1259978823ff4b7d2f3206f6a116.tar.gz |
avformat/avidec: Fix memleak with embedded GAB2 subtitles
The code for GAB2 subtitles predates refcounting AVPackets. So in order
to transfer the ownership of a packet's data pkt->data was simply stored
and the packet zeroed; in the end (i.e. in the read_close-function) this
data was then simply freed with av_freep(). This of course leads to a leak
of an AVBufferRef and an AVBuffer. It has been fixed by keeping and
eventually unreferencing the packet's buf instead.
Additionally, the packet is now reset via av_packet_unref().
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit da44bbefaabeb2fdb58a03fe533a44aa150486fc)
Diffstat (limited to 'doc/examples/avio_dir_cmd.c')
0 files changed, 0 insertions, 0 deletions