src/io/source_avcodec.c: call avformat_free_context after avformat_close_input