]> git.sesse.net Git - ffmpeg/commit
avformat/utils: Fix memleaks II
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 20 Sep 2019 20:39:12 +0000 (22:39 +0200)
committerJames Almer <jamrial@gmail.com>
Sat, 28 Sep 2019 21:32:43 +0000 (18:32 -0300)
commitbf79e4426a94d17ca49b01ab1624c5d59ae59bb2
tree48fafcb0ab89f642d885868708af1241cfe12bff
parent47a4528abc9702da02b2115c4ad235e70138648a
avformat/utils: Fix memleaks II

Up until now, avformat_find_stream_info had a potential for memleaks:
When everything was fine, it read packets and (depending upon whether
AVFMT_FLAG_NOBUFFER was set) put them in a packet list or unreferenced
them when they were no longer needed. But upon failure, said packets
would leak if they were not already on the packet list. This patch fixes
this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/utils.c