]> git.sesse.net Git - ffmpeg/commit
avformat/mov: Fix memleaks upon read_header failure
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 13 Jun 2020 22:37:40 +0000 (00:37 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 15 Jun 2020 14:46:15 +0000 (16:46 +0200)
commitac378c535be907ee383dafb430be7216a2920982
tree6b51e98c79d2557d053b3887735aa1618062865c
parent3d3ba43bc68ca90fe72d0fc390c9e5f5c7de1513
avformat/mov: Fix memleaks upon read_header failure

By default, a demuxer's read_close function is not called automatically
if an error happens when reading the header; instead it is up to the
demuxer to clean up after itself in this case. The mov demuxer did this
by calling its read_close function when it encountered some errors when
reading the header. Yet for other errors (mostly adding side-data to
streams) this has been forgotten, so that all the internal structures
of the demuxer leak.

This commit fixes this by making sure mov_read_close is called when
necessary.

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