You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
avformat/mov: Fix memleak
When the mov/mp4 demuxer encounters an error during decrypting a packet,
it returns the error, yet doesn't free the packet, so that the packet
leaks. This has been fixed in this commit.
Fixes the memleaks from ticket #8150.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 34bd293b01
)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
@ -7819,8 +7819,10 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
aax_filter(pkt->data, pkt->size, mov);
|
aax_filter(pkt->data, pkt->size, mov);
|
||||||
|
|
||||||
ret = cenc_filter(mov, st, sc, pkt, current_index);
|
ret = cenc_filter(mov, st, sc, pkt, current_index);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
av_packet_unref(pkt);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user