An AVFormatContext leaks on errors that happen before it is attached to its permanent place (an InputFile). Fix this by attaching it earlier. Given that it is not documented that avformat_close_input() is usable with an AVFormatContext that has only been allocated with avformat_alloc_context() and not opened with avformat_open_input(), one error path before avformat_open_input() had to be treated specially: It uses avformat_free_context(). Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>pull/390/head
parent
d98dfcecad
commit
c06d3d2404
1 changed files with 5 additions and 5 deletions
Loading…
Reference in new issue